=========================================================================
TAB键的话你可以通过设置TEXT控件的TabIndex属性来控制。
例如文本框1的TabIndex是0,文本框2的TabIndex是1,文本框3的TabIndex是3。这样按tab键的时候就会在三个文本框之间切换。
至于回车键的话,只能在每个文本框的keypress里面添加代码来实现:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
……