Can't set focus to input textbox?

Troy

Well-known member
Joined
Feb 7, 2005
Messages
153
Programming Experience
10+
Ok I can rememeber doing this before but for some reason it's not working now.

I want to set my textbox to have the flashing cursor and be ready for input after the form is loaded.

I thought you used focus so I am using this :

VB.NET:
txtLastName1.Focus()

But it isn't working. Any ideas? What am I doing wrong?
 
From Control.Focus Method documentation:
Focus is a low-level method intended primarily for custom control authors. Instead, application programmers should use the Select method or the ActiveControl property for child controls, or the Activate method for forms.
 
From Control.Focus Method documentation:

Sweet that did it thanks John. Seriously The more I know the more I need to know. It's getting harder and harder to keep up with the basics after several incarnations of programming languages.
 
Back
Top