先把窗口内的所有控件的visible=false
然后用keydown事件判断上下左右键
用sendkeys "{TAB}"

解决方案 »

  1.   

    参考一下下面的代码:
    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
      

  2.   

    要看你要干什么了
    如果你要做输入处理的话,可以用改变焦点来做
    Text1.SetFocus 将焦点放于text1Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 37 Then
      Text2.SetFocus
    End If
    End Sub