Locations of visitors to this page


Onteora Software - DXCore

Onteora Software

Ken Tucker's Blog

About the author

Author Name is someone.
E-mail me Send mail

Recent posts

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

DXCore

DXCore



Developers express has a free product DX Core. It is a framework to develop add ins for visual studio. With it you can paint on the ide, work with the text, etc.


I answer alot of questions in the newsgroups and forums. From time to time I copy code from the ide and when it pasted it looses the format. To overcome this limitation I usually paste the text in notepad. I then recopy the text and paste it in the question I am answering to preseve the format.


Today I used the dxcore to add the copy as text to context menu when you right click on selected code. Step one download and install the DXCore. Note the dx core does not work with the express editions of visual studio.


Step 2 from the DevExpress menu added to visual studio select New Plug in. This will create a project for the addin.


Step 3 Drag a Action on to the designer from the toolbox. Set it action name, button text, and desciption to Copy as Text. Set the CommonMenu to EditorContext. Double Click on the action and add this code to the Action_Execute Event.

    Private Sub Action1_Execute(ByVal ea As DevExpress.CodeRush.Core.ExecuteEventArgs) Handles Action1.Execute
        Dim template As String = CodeRush.Selection.Text

        Clipboard.SetDataObject(template)

    End Sub

Run this from the ide. It will open up another instance of the ide. Open a project and select some code and right click on it. You will see the copy as text in the menu, Boy does dev express make it easy.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: General | DXCore
Posted by Ken Tucker on Monday, May 15, 2006 10:12 PM
Permalink | Comments (0) | Post RSSRSS comment feed