TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sachith wickramaarachchi
NA
108
188.4k
Highlight text in textbox2,selected word in textbox1
Mar 24 2015 4:21 AM
I wants to highlight text in textbox2,selected word in textbox1
like this picture :
http://i.stack.imgur.com/3juO5.jpg
[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
Reply
Answers (
1
)
if condition for more true result
c# how can return value from class?