You should use the Shown
event instead:
private void Find_Shown(object sender, EventArgs e){
textBox1.Focus();
}
Note: you used Paint
event which will be very nasty, everytime your form is repainted, your textBox1
will be focused, the Paint
event is fired every time your form resizes, state changes, ... we can't determine exactly the time it fires but it fires fairly frequently when your form is running. That is the reason why you can't click on and select anything on your form. That's because clicking or selecting controls fires the Paint
event and makes your textBox1
focused then.