Click to See Complete Forum and Search --> : Record any key being pressed!!!!!!
Please help.
I tried to record keys using GetAsyncKeyState(iKey) but it does not properly works. If anybody know another way or method please let me know. THX
This is how you use the GetAsyncKeyState API function.
Private Declare Function GetAsyncKeyState _
Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
Dim iKey As Integer
For iKey = 3 To 255
If GetAsyncKeyState(iKey) Then Caption = iKey
Next
End Sub
Yes but even that possibility doesn't work properly. You do not receive the exact stringchain you have entered. Try it out!!!!! It is like a puzzle after a while of running!!!
Set the Timer's Interval higher.
I don't have the exact code, but I can give you some pointers. Use Global-wide hooks and the KeyBoardProc Callback. This can track much better than GetAsyncKeyState.
parksie
Jan 13th, 2001, 05:45 PM
How about setting the form's KeyPreview property to True. Then you'll get a Form_KeyPress event even if something else has focus.
Form_keydown is a good idea but you will receive keys when the form has focus and that is not what i want.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.