vb.net - Dynamically paste Visual Studio styled code in a RichTextBox -


i'd dynamically paste visual studio styled/formatted code (with font colors) in richtextbox.

it only works when paste code @ runtime user (using ctrl+v in richtextbox) not when use code richtextbox1.text = my.computer.clipboard.gettext().

result when manually :

enter image description here

result when dynamically :

enter image description here

i've tried using richtextbox1.text = my.computer.clipboard.gettext(textdataformat.rtf), it doesn't work too :

enter image description here

so, how can paste text dynamically same result when paste manually ?

ps : full code i'm using in screenshots ;)

regards, drarig29.

the text property of richtextbox control not formatting, try using rtf property instead:

richtextbox1.rtf = my.computer.clipboard.gettext(textdataformat.rtf) 

Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -