scottiesi
asked on
VB.NET - Howto give a TextBox keyboard focus
Hi,
When doing Windows Forms in VB.NET, and you have a bunch of TextBox controls, how do you give the first one keyboard focus?
Do you use the method Focus( ) for this?
Thanks.
When doing Windows Forms in VB.NET, and you have a bunch of TextBox controls, how do you give the first one keyboard focus?
Do you use the method Focus( ) for this?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, but that doesn't necessarily give a textbox focus, to do so you would need to use:
TextBox1.Select()
Thanks.
TextBox1.Select()
Thanks.
If you have your tabIndex setup to start it 0 on the first Textbox this will have the first focus(cursor placement) on that textbox, or you can force a focus on that textbox when you load that form(like what brother7 was talking about).