I wanted to have textbox always focused. So I decided to add LostFocus handler
this.textBox1.LostFocus += new System.EventHandler(delegate(object sender, System.EventArgs e)
{
this.textBox1.Focus();
});
But when I press buttons on the form and then begin to write into textbox again – it starts to add symbols before current text in textbox. For the example if I’ve got text in textbox abcd and then press button on the form and start to write again 1234 I have in the textbox text 1234abcd.
How to resolve this problem?
1 Answer