I need to get read a deselect text from a full text in a combobox where some text are highlighted.
Suppose the searching text is emergency where emer is not highlighted but gency is highlighted.
Now I want to read this deselect text emer to perform operation.
textbox1: emergency (at typing)
textbox2.Text = textbox1.Text.Substring(textbox1.SelectionStart, textbox1.SelectionLength);
I am trying this code variously. But it's not working.
Help me plz.Thanks in advance.
How to get deselect text from a full text in a combobox
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Apr 24, 2013, 7:59 AM EDT
Javeed M ShaikhRank #839 · 2.7K reputationPosted Apr 24, 2013, 8:02 AM EDT
string notselected = textBox1.Text.Substring(0, textBox1.Text.Length - textBox1.SelectionLength);