For example, I might want to color the world "hi", so when the user is typing in the rich text box, if they type "hi" it would immediately change colors and the word "hi" would be a different color from all the other text in the rich text box.
How would I do that?
I've tried something like:
richTextBox.Select(rtxtMain.Text.IndexOf("hi"), "hi".Length); richtextBox.SelectionColor = Color.Aqua;
Its error/warning free, but when I debug it and type in "hi" the program just crashes.
So, how would I change the color of specific words (but not that of other words) while a user is typing into a rich text box?