This program gets the state of any key on the keyboard. It works even when many other keys are bein
This program gets the state of any key on the keyboard. It works even when many other keys are being pressed! It also works when your program
Rate This program gets the state of any key on the keyboard. It works even when many other keys are bein
(1(1 Vote))
'get key input when more than four keys are being
'pressed? With this API it is no longer a problem!
'This is a short sample that gets the state of any key
'on the keyboard. The numbers passed in are the same as
'the keycodes in Form_KeyDown. You can look these up by
'typing "key code constants" in the VB help. The return
'values are sort of weird. At the beginning, the value
'of an unpressed key is 0, if it is held down after that,
'the value is -127, unpressed again is 1, and the second
'pressed value is -128. This cycle then repeats itself.
Dim RetValue As Long
Dim SendKeyCode As Long
SendKeyCode = 37 'Left key
RetValue = GetKeyState(SendKeyCode)
Print RetValue
This program gets the state of any key on the keyboard. It works even when many other keys are bein Comments
No comments yet — be the first to post one!
Post a Comment