G
Guest
Hello,
I'm trying to set the focus on a form to the first control on the form when
the form is activated. I'm basically coming back to the form from another
form and want the form cleared and focus returned to the start.
Here's my activated event.
Private Sub frmTicketingItems_Activated(ByVal sender As Object, ByVal e
As System.EventArgs) Handles MyBase.Activated
updateStatus()
pnl.Controls(1).Focus()
End Sub
There's a label in the 0 index control which is why I am setting focus on
index 1.
The code runs properly, but the focus stays in the control I last had it in
when I left the screen at first, or focus disappears completely.
Any help is appreciated.
Thank
Robert Brown
I'm trying to set the focus on a form to the first control on the form when
the form is activated. I'm basically coming back to the form from another
form and want the form cleared and focus returned to the start.
Here's my activated event.
Private Sub frmTicketingItems_Activated(ByVal sender As Object, ByVal e
As System.EventArgs) Handles MyBase.Activated
updateStatus()
pnl.Controls(1).Focus()
End Sub
There's a label in the 0 index control which is why I am setting focus on
index 1.
The code runs properly, but the focus stays in the control I last had it in
when I left the screen at first, or focus disappears completely.
Any help is appreciated.
Thank
Robert Brown