How to Check the KeyState of the supplied Key
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 | 'System & API - How to Check the KeyState of the supplied Key Option Explicit Public Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Private Sub Command1_Click() If GetKeyState(vbKeyEscape) < 0 Then 'Do Something If Escape is pressed End If End Sub |