|
-
Jan 9th, 2001, 04:44 PM
#1
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
-
Jan 9th, 2001, 08:08 PM
#2
This is how you use the GetAsyncKeyState API function.
Code:
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
-
Jan 13th, 2001, 06:37 AM
#3
!!!
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!!!
-
Jan 13th, 2001, 12:37 PM
#4
Set the Timer's Interval higher.
-
Jan 13th, 2001, 06:36 PM
#5
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.
-
Jan 13th, 2001, 06:45 PM
#6
Monday Morning Lunatic
How about setting the form's KeyPreview property to True. Then you'll get a Form_KeyPress event even if something else has focus.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jan 16th, 2001, 12:57 PM
#7
!!!
Form_keydown is a good idea but you will receive keys when the form has focus and that is not what i want.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|