I've been trying to color some words in my textbox like "hi", "bye"
I've tried stuff like:
int stIndex = 0;
stIndex = richTextBox1.Find(wh, stIndex, RichTextBoxFinds.MatchCase);
while (stIndex != -1)
{
if (richTextBox1.SelectedText == wh)
{
richTextBox1.SelectionLength = wh.Length;
richTextBox1.SelectionColor = Color.Blue;
}
stIndex = richTextBox1.Find(wh, stIndex + 1, RichTextBoxFinds.MatchCase);
}
but that selects the words thus moving the cursor is there any other way to do this?