If you want to include screen dump text/code in the post, you can utilize the insert code component in the Rich Text editor.
It will include the highlighted code like this:
. Your code goes here... . . UgSession::initialize ( ) // Your Open C++ code here UgSession::terminate ( ) . . .
Actually, you can copy/paste code from Visual Studio
directly into the Rich Text window, because Vis Studio places RTF on the Clipboard when you do a Cut or Copy. Pasting messes up the spaces, but it preserves colors and font, which is nice.
Dim d, x, y As Double
Dim pt As NX.Point
Dim nU = 100
Dim nV = 70
Dim pts(nU, nV) As Position
Also, as far as I can see, code that you write in the special "Insert Code" window just gets sandwiched between <pre> and </pre> tags, so you could easily just type this HTML yourself, if you wanted.
Maybe I was a little to quick with my kudo
I couldn't reproduce the behaviour @Yamada describes.
I tried Visual Studio 2010 Professional, Visual Studio 2015 Express and various methods in Notepad++ (found in Menu -> Plugins -> NppExport) to copy RTF/formatted Text into the forum's editor using Firefox, Internet Explorer and Chrome.
The most I got was the pasted text being wrapped in a <pre>-section automatically. Often the formatted text wouldn't even show up in the editor at all (though pasting to e.g. Word worked fine with preserved formatting).
Is there still a way to get syntax highlighted code in the forum? Or will it boil down to manually editing the HTML?
Would be really cool to have some kind of shortcut to paste formatted/highlighted code!
Sorry, @Yamada, I think I worded my reply a bit wrong. I did not at all mean to imply that your post was wrong. It was just a funny moment, when I read your post, thought "great tip, finally!", kudoed you, and then it didn't work
I suppose, that the feature propably has been removed during some redesign process (as the screenshots in the first post are outdated, too). Hopefully this gets another update, soon