Position Cursor

  • Thread starter Thread starter Suresh Kumaran
  • Start date Start date
S

Suresh Kumaran

Hi All,

I have a form with 3 tab controls. Each tab control has
its own text boxes placed. My question is how do I place
the cursor in the first text box in the respective tab
control as the user clicks from tab control to tab
control.


Appreciate help.



SK
 
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged

Select Case TabControl1.SelectedIndex

Case 0

TextBox1.Focus()

Case 1

TextBox2.Focus()

End Select

End Sub


--
Sylvain Barde

MCP Microsoft Certified Professional
MCT Microsoft Certified Trainer
_________________________________________



MCSD Microsoft Certified Solution Developer
 
Sylvain

Thanks. It worked


SK

-----Original Message-----
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged

Select Case TabControl1.SelectedIndex

Case 0

TextBox1.Focus()

Case 1

TextBox2.Focus()

End Select

End Sub


--
Sylvain Barde

MCP Microsoft Certified Professional
MCT Microsoft Certified Trainer
_________________________________________



MCSD Microsoft Certified Solution Developer
"Suresh Kumaran" <[email protected]> a écrit dans le message de



.
 
Back
Top