Hi Everyone,
I would like to know if there is any way to change the color of a part of text in rich textbox when the user types it automatically like the way in vb.net IDE (Classes have blue etc.).
Thanks in advance,
Yuvjeeth

I guess you're talking about Syntax Highlighting. You need to select that part of text by using SelectionStart & SelectionLength (from RichTextBox) and then, change it's color with SelectionColor.

As an example, this code makes the first 10 characters blue:

richTextBox1.SelectionStart = 0;
richTextBox1.SelectionLength = 10;
richTextBox1.SelectionColor = Color.Blue;

but I want to highlight some parts of HTML document such as tags in my app. So how do I do that because all tag lengths are not equal