有这个必要吗,有MouseDown,MouseUp事件不用???!!!

解决方案 »

  1.   

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
        MsgBox KeyCode
    End Sub试试看,ctrl是17所以,你在KeyDown事件里这样判断
    if KeyCode=17 then
       ....
    end if
      

  2.   

    Dim iKeyCode As Integer
    Private Sub Command1_Click()
    If iKeyCode = 2 Then
        Debug.Print "Ctrl Be press!"
    End If
    End SubPrivate Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
    iKeyCode = Shift
    End Sub
      

  3.   

    不好意思,写错了,应该是KeyDown,KeyUp事件。呵呵!