Selecting a word from a text box
4 answers
The Windows Forms TextBox control has a SelectedText property that will return the selected portion of the TextBox value.
http://msdn.microsoft.com/en-us/library/aa288415%28VS.71%29.aspx
+6
a source to share
From MSDN Code: Define Selected Text in a TextBox Control (Visual C #)
private void button1_Click(object sender, System.EventArgs e)
{
textBox1.Text = "Hello World";
textBox1.Select(6, 5);
MessageBox.Show(textBox1.SelectedText);
}
+3
a source to share