I have a textbox and in some cases in Enter event I need to set the focus to a different textbox.
I tried that code:
private void TextBox1_Enter(object
Postpone executing the Focus() method until after the event is finished executing. Elegantly done by using the Control.BeginInvoke() method. Like this:
private void textBox2_Enter(object sender, EventArgs e) { this.BeginInvoke((MethodInvoker)delegate { textBox3.Focus(); }); }