Private Sub Command1_Click()
form2.Show
'如要显示模式窗体则 form2.show vbmodal
End Sub
1.HOOK
2.
Private Function MyHotKey(vKeyCode) As Boolean
MyHotKey = (GetAsyncKeyState(vKeyCode) < 0)
End Function
'下面的vbKeyF1,你可以随便写按键;
If MyHotKey(vbKeyF1) Then
Command1.Caption = F1
End If
PS;都是比较麻烦的代码,方法2中,需要你把所有的键 都要IF一遍~!
参考资料:
楼上正解
Private Sub Command1_Click()
form2.Show
'如要显示模式窗体则 form2.show vbmodal
End Sub