参考一下下面的代码: Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 37 Then SendKeys "+{tab}" End If If KeyCode = 39 Then SendKeys "{tab}" End If End Subhttp://www.xygu.com
要看你要干什么了 如果你要做输入处理的话,可以用改变焦点来做 Text1.SetFocus 将焦点放于text1Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 37 Then Text2.SetFocus End If End Sub
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 37 Then
SendKeys "+{tab}"
End If
If KeyCode = 39 Then
SendKeys "{tab}"
End If
End Subhttp://www.xygu.com
如果你要做输入处理的话,可以用改变焦点来做
Text1.SetFocus 将焦点放于text1Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 37 Then
Text2.SetFocus
End If
End Sub