Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting focus on a control
Message
 
 
À
17/03/2010 19:44:52
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01455255
Message ID:
01455256
Vues:
38
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform