天天看点

[vb6.0] 快捷键触发事件

Private Sub Form_Load()

    '//激活按键事件

    Me.KeyPreview = True

End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

    If KeyCode = vbKeyD And Shift = 2 Then 'CTRL+D

        MsgBox "ctrl+d"

    End If

End Sub