文件名称:VB按键码查看器 VB 按键 keycode 下载 c++
文件大小:48KB
文件格式:EXE
更新时间:2012-11-05 05:33:21
VB 按键 keycode 下载 c++
查看 vb keycode Private Sub Form_Load() Check1.Value = 1 End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If Check1.Value = 1 Then MsgBox KeyCode ElseIf Check2.Value = 1 Then MsgBox Shift End If Dim ShiftDown, AltDown, CtrlDown, Txt ShiftDown = (Shift And vbShiftMask) > 0 AltDown = (Shift And vbAltMask) > 0 CtrlDown = (Shift And vbCtrlMask) > 0 If KeyCode = vbKeyF2 Then ' 显示键组合. If ShiftDown And CtrlDown And AltDown Then Txt = "SHIFT+CTRL+ALT+F2." ElseIf ShiftDown And AltDown Then Txt = "SHIFT+ALT+F2." ElseIf ShiftDown And CtrlDown Then Txt = "SHIFT+CTRL+F2." ElseIf CtrlDown And AltDown Then Txt = "CTRL+ALT+F2." ElseIf ShiftDown Then Txt = "SHIFT+F2." ElseIf CtrlDown Then Txt = "CTRL+F2." ElseIf AltDown Then Txt = "ALT+F2." ElseIf Shift = 0 Then Txt = "F2." End If Text1.Text = "You pressed " & Txt End If End Sub