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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top