Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting focus on a control
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:
01455258
Views:
34
>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?

I just tried the Focus() in my WinForm (C#) app and it does not work either. Hopefully someone knows what we are missing.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform