Private Sub Form_Load()
SSTab1.TabStop = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = Asc(vbTab) Then
SSTab1.Tab = 1
Combo1.SetFocus
End If
End Sub
by disabling TabStop in ssTab you can handle it in the KeyPress event of the textbox, this because it is the only control in the tab that can receive focus
____________________________
AndreaVB
25-10-2006 at 06:43 AM
|
luckyboy Level: VB Lord Registered: 05-05-2005 Posts: 160
Re: press Tab in Tab control?
if have many text box in tab 0. can i do this without disable the tab stop in text box?
if you have many controls you have to disable TabStop for every control and manage it through code, you'll have to handle all KeyPress events to define your sequence until the last textbox that will move the focus to the next tab and the combo box
i.e. text1 will pass focus to text2 in his KeyPress event, text2 will move focus to text3 and then text3 will chose a new tab and move focus to combobox, you'll have to wite the KeyPress event for every control in your form