Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting focus on a control
Message
From
17/03/2010 19:44:52
 
 
To
All
General information
Forum:
ASP.NET
Category:
Forms
Title:
Setting focus on a control
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:
01455255
Views:
99
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?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform