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
Loading
Jignesh TrivediPosted Mar 26, 2015, 11:39 PM
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.