Message
 
 
To
17/03/2010 19:44:52
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01455255
Message ID:
01455256
Views:
40
>The documentation says to use the control Focus() method to set the focus on a specific control at load time by the use of the form Load() event. So, I have a code like this:
>
>
>    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
>
>        ' Set focus to username
>        Username.Focus()
>
>    End Sub
>
>
>But, the focus is not in that control. What am I missing?

Check Setting focus to first control on page Thread #1452441 Message #1452441

e.g.

Page.SetFocus("UserName")

Oops - looks like you're talking about WinForms, right?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View