M
mp
is this namespace the only way to check
GetAsyncKeyState?
I'm doing something wrong as usual
i have:
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As
Integer
Private eKeyCode As KeyEventArgs
Public Function UserEscaped() As Boolean
eKeyCode = New KeyEventArgs(Keys.Escape)
If checkkey(CLng(eKeyCode.KeyCode)) Then
'If CBool(GetAsyncKeyState(CLng(eKeyCode.KeyCode.Space))) Then
MsgBox("Hit escape key")
Return True
End If
End Function
Function checkkey(ByVal lngKey As Long) As Boolean
If CBool(GetAsyncKeyState(lngKey)) Then
checkkey = True
Else
checkkey = False
End If
End Function
i'm not getting the msgbox when i hit the escape key
any tips?
thanks
mark
GetAsyncKeyState?
I'm doing something wrong as usual
i have:
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As
Integer
Private eKeyCode As KeyEventArgs
Public Function UserEscaped() As Boolean
eKeyCode = New KeyEventArgs(Keys.Escape)
If checkkey(CLng(eKeyCode.KeyCode)) Then
'If CBool(GetAsyncKeyState(CLng(eKeyCode.KeyCode.Space))) Then
MsgBox("Hit escape key")
Return True
End If
End Function
Function checkkey(ByVal lngKey As Long) As Boolean
If CBool(GetAsyncKeyState(lngKey)) Then
checkkey = True
Else
checkkey = False
End If
End Function
i'm not getting the msgbox when i hit the escape key
any tips?
thanks
mark