I wants do this.uploaded file is source file.please help me
String A = textBox1.Text.Trim();
A = A.Replace("ab", "cdq");
A = A.Replace("ef", "ghe");
A = A.Replace("ij", "klt");
A = A.Replace("mn", "opf");
A = A.Replace("qu", "rsg");
A = A.Replace("tu", "vwd");
textBox2.Text = (A);
if i select "ab" from textbox1,highlight "cdq" in textbox2
if i select "ef" from textbox1,highlight "ghe" in textbox2
if i select "ij" from textbox1,highlight "klt" in textbox2
Highlight text
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 26, 2015, 7:39 PM EDT
Hi,
to do this you have to use rich textbox.
it has find method and selection color method using this you can achieve your task..
richTextBox1.Find("abc", RichTextBoxFinds.WholeWord);
richTextBox1.SelectionColor = Color.Blue;
richTextBox1.Find("cqg", RichTextBoxFinds.WholeWord);
richTextBox1.SelectionColor = Color.Blue;
richTextBox1.Find("ghe", RichTextBoxFinds.WholeWord);
richTextBox1.SelectionColor = Color.Blue;
hope this will help you.