I have a TextBox
in my C# program. I need focus to be on this TextBox
when the program starts.
I tried this on Form_Load:
MyTextBox.Focus();
but it doesn't work.
How do I put focus on this when the form loads?
Set theActiveControl
property of the form and you should be fine.
this.ActiveControl = yourtextboxname;