>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 #
1452441e.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