Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Is it wrong for an application to copy to clipboard?

$
0
0

In an add-in to Visual Studio I want to take copy of the source code in the code window to the Clipboard using the following:   

objTextDoc = CType(_applicationObject.ActiveDocument.Object("TextDocument"), TextDocument) Selection = objTextDoc.Selection() Selection.SelectAll() Selection.Copy()

The reason is that Visual Studio copies the source code in RTF format to the clipboard that includessyntax highlighted source code , I need the syntax highlighted code.

I have read so many articles on the internet that say that no application should overwrite the clipboard contents. I tend to agree with that.  

If I could find another way to get hold of syntax highlighted code for a projectItem in a VS Project I would prefer not to use the clipboard.

What advice do you guys have?

Joginder Nahil
www.starprinttools.com




Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>