Dim index As Integer = 0 Dim temp As String = RichTextBox1.Text RichTextBox1.Text = "" RichTextBox1.Text = temp While index < RichTextBox1.Text.LastIndexOf(TextBox1.Text) RichTextBox1.Find(TextBox1.Text, index, RichTextBox1.TextLength, RichTextBoxFinds.None) RichTextBox1.SelectionBackColor = Color.Red index = RichTextBox1.Text.IndexOf(TextBox1.Text, index) + 1 End While
-------------------------------------------
How to highlight occurrences of a search term in text in Visual Studio
Highlight Find Results vb.net
Highlight all occurrences of selected word - Visual Studio visual basic
Highlighting Text VB.Net
Find and Highlight Macro in Microsoft Word
Visual Studio word highlighting How do I make all occurrences of a phrase (search term) in a file to be highlighted in the VS .... Highlight all occurrences of selected word ... How to highlight occurrences of a search term in text in Visual Studio editor for VB.NET