Textbox focus on tabpage?

  • Thread starter Thread starter explode
  • Start date Start date
E

explode

I have two tab pages.In the first tabpage I have some textboxes also in
the second tabpage.
I wont to get focus on Textbox3 (in tabpage2) when I enter the
tabpage2 but it wont do that.
This is my code:

Private Sub TabPage2_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TabPage2.Enter
TextBox3.Focus()
End Sub

What is the problem?
Thank you!
 
Here is something to try.

Make sure Textbox3 has the lowest TabIndex value of any control on
TabPage2. Then in your TabPage2_Enter event handler, set

Me.ActiveControl = Me.TabPage2

==============
Clay Burch
Syncfusion, Inc.
 
Back
Top