以下代码可以运行,
Private Sub Form_KeyDown(KeyCode As Integer, shift As Integer)
If KeyCode = vbKeyW + vbKeyAlt Then
MsgBox "F5 按下"
End If
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
但是加了 "+ vbKeyShift "以后,按住这 "Shift+Alt+W" 三个键,程序没反应.请高手帮忙,兄弟在此先谢谢了!
Private Sub Form_KeyDown(KeyCode As Integer, shift As Integer)
If KeyCode = vbKeyW + vbKeyAlt Then
MsgBox "F5 按下"
End If
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
但是加了 "+ vbKeyShift "以后,按住这 "Shift+Alt+W" 三个键,程序没反应.请高手帮忙,兄弟在此先谢谢了!
==>
if keycode=vbkeyw and shift=6 then
所以 (alt or shift)应该等于5