Coloring text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

how can I automatically change the color of specific words in my RichTextBox
(VB .NET). The feature I want to create is similar to the feature that's
included in VS.NET: Some specific keywords are colored. How can this be done?

Thanks,
Peter
 
Use SelectionColor property

Eg

RichTextBox1.Text = "This is Sample Text"
RichTextBox1.Select(8, 6)
RichTextBox1.SelectionColor = Color.Blue
RichTextBox1.Select(0, 0)

Rgrds
Ramesh Krishnamoorthy
 
Back
Top