In VB.Net in a form I have two text boxes.
First textbox contains a line of text "the quick brown fox jumps over a lazy dog"
in second text same thing i want to type.
My question is when i type the text in second textbox, the text available in first textbox should be highlighted or underlined word by word.
example
the quick brown fox jumps over a lazy dog
---
the quick brown fox jumps over a lazy dog
-----
if i type "the" then above "the" should be highlighted or underlined.
next if i type "quick" then above "quick" should be highlighted or underlined. like this it should continue till the end.
What I have tried:
textbox1.cocus
RichTextBox1.SelectionStart = 0
RichTextBox1.SelectionLength = RichTextBox1.Text.Length
RichTextBox1.SelectionColor = Color.Black
RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont, FontStyle.Regular)
RichTextBox1.SelectionStart = 0
RichTextBox1.SelectionLength = array(0).Length
RichTextBox1.SelectionColor = Color.Green
RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont, FontStyle.Underline)