Highlight the text

Sean219

Member
Joined
Mar 8, 2007
Messages
8
Programming Experience
Beginner
hi guys,
Currently i need to highlight my text in RTB ( rich text box ). My highlight is not changing the font color or bold or italic ...

I want the background of the text fill with another color. Just the background of the text and not the background of the RTB. Is there any way to do it ?
 
Thanks JohnH !!
Is that means only VB2005 can do the highlighting text and not VB2003.
Bcos i currently use VB2003 to do my project.
Is the RichTextBox.Highlight avialable in 2003 ? Later i will try the codes any way, thanks again for the help.
 
Yes, that's true, you have to use the Win32 code I pointed to.
 
JohnH, sorry for disturbing u again. i already upgrade to 2005 but i cant get the RTB.highlight properties. I had download the example u gave me but seem there have 2 kind of form and i dunno how to apply it to my project. My project contain 1 RTB and inside the RTB got a line of text. i wan to change the background color for character number 3 and 6 then the rest remain default . How am i going to do it if i just have 1 form?
 
.Net 2.0 doesn't need that class, just do as I said in post 2, set the RTBs SelectionBackColor property.
 
Back
Top