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 :
result when dynamically :
i've tried using richtextbox1.text = my.computer.clipboard.gettext(textdataformat.rtf)
, it doesn't work too :
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
Post a Comment