|
-
Oct 3rd, 2000, 11:39 AM
#1
Thread Starter
New Member
Hi,
I don't know what the hell I'm doing wrong but I get true results for key checks when the keys weren't pressed. I've tried using getkeystate with the &H8000 and I'm still getting trues in my timer loop. Can anyone give me a quick solution to this ridiculous nightmare? If it makes a difference, I'm checking for key hits while the browser control is loading documents. I have a web app that needs to buffer keystrokes when the browser is busy.
Thanks for your help,
Mike
-
Oct 3rd, 2000, 02:05 PM
#2
If you are using the GetAsyncKeyState api function, than you should start at 3 since 0-2 are part the mouse.
Code:
Private Declare Function GetAsyncKeyState _
Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
Dim i As Integer
For i = 3 To 255
If GetAsyncKeyState(i) Then Debug.Print Chr(i)
Next
End Sub
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
|