I wants to highlight text in textbox2,selected word in textbox1
[CODE]
private void textBox1_TextChanged(object sender, EventArgs e)
{
String A = textBox1.Text.Trim();
textBox2.Text = (A);
}
private void textBox1_MouseUp(object sender, MouseEventArgs e)
{
if (textBox1.SelectionLength > 1)
{
textBox2.Select(Strings.InStr(textBox2.Text, textBox1.SelectedText, CompareMethod.Text) - 1, textBox1.SelectionLength);
textBox2.Focus();
}
}
[/CODE]
Tried this code,but it's not working,plz help me