vb怎样使用热键

来源:百度知道 编辑:UC知道 时间:2024/06/18 15:57:14
使用热键 ctrl+0 使用热键关闭该程序
Private Sub Form_Load()
Timer1.Interval = 100
Timer2.Interval = 30 '每30毫秒检查一次
Timer2.Enabled = True
End Sub
---------------------------------------
Private Sub Timer2_Timer()

End Sub
------------------------------
在timer中使用

没搞懂??
“使用ctrl+0 使用热键关闭该程序 ”这个叫快捷键 , 在菜单编辑器里直接设置就行了
热键是按Alt加字母打开菜单的格式如 关闭(&O)
你想用KeyDown事件吧
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 79 And Shift = 2 Then End
End Sub

关闭(&O)