Nhờ hướng dẫn phím tắt trên forms
DoquangLam > 13-06-11, 06:08 PM
Mình đã tham khảo code dưới đây, nhưng không biết cách áp dụng vào bài của mình, nhờ các bạn giúp đỡ nhé.
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case "8"
MsgBox "Backspace Keyis " & KeyCode
Case "9"
MsgBox "Tap Key is " & KeyCode
Case "12"
MsgBox "Clear Key is " & KeyCode
Case "13"
MsgBox "Enter Key is " & KeyCode
Case "16"
MsgBox "Shift Key is " & KeyCode
Case "17"
MsgBox "Control Key is " & KeyCode
Case "27"
MsgBox "Esc Key is " & KeyCode
Case "32"
MsgBox "SpaceBar Key is " & KeyCode
Case "112"
MsgBox "F1 Key is " & KeyCode
Case "113"
MsgBox "F2 Key is " & KeyCode
Case "114"
MsgBox "F3 Key is " & KeyCode
Case "115"
MsgBox "F4 Key is " & KeyCode
Case "116"
MsgBox "F5 Key is " & KeyCode
Case "117"
MsgBox "F6 Key is " & KeyCode
Case "118"
MsgBox "F7 Key is " & KeyCode
Case "119"
MsgBox "F8 Key is " & KeyCode
Case "120"
MsgBox "F9 Key is " & KeyCode
Case "121"
MsgBox "F10 Key is " & KeyCode
Case "122"
MsgBox "F11 Key is " & KeyCode
Case "123"
MsgBox "F12 Key is " & KeyCode
Case Else
MsgBox "you is press " & KeyCode
End Select
End Sub