Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27532

Change command color ?

$
0
0
Hello i want to make that when i write the color "print" it change color but i made a little code that change it BUT if i use print command in my richtextbox more that 1 time other print text dont change the color
Code:

If InStr(RichTextBox1.Text, "print") Then
            RichTextBox1.Find("print")
            RichTextBox1.SelectionColor = Color.Orange
            RichTextBox1.DeselectAll()
end if

        RichTextBox1.Select(RichTextBox1.Text.Length, RichTextBox1.Text.Length)
        RichTextBox1.SelectionColor = Color.Black

i write an:
print test < Recolor
print test < DONT RECOLOR

Viewing all articles
Browse latest Browse all 27532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>