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

来源:互联网 发布:龙腾世纪3优化补丁 编辑:程序博客网 时间:2024/04/29 22:54

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







0 0