Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbCtrlMask And (KeyCode = Asc("g") Or KeyCode = Asc("G")) Then
call 交换机程序
(如果交换机程序是一个单独的程序,就用"Shell "d:\交换机程序.exe", vbNormalFocus")
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbCtrlMask And (KeyCode = Asc("g") Or KeyCode = Asc("G")) Then
call 交换机程序
(如果交换机程序是一个单独的程序,就用"Shell "交换机程序.exe", vbNormalFocus")
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbCtrlMask And KeyCode = Asc("g") Or KeyCode = Asc("G") Then MsgBox "FF"
End Sub
如果你在窗体上按下ctrl+g或者ctrl+G都会弹出窗口