I have been referred a few times to used the GetAsnc or something like that to read user input, but until now, mine dun seem to register this kind of code.
SO I have resorted to the
if keycode=vbKeyDown
that sort of thing....What did I do wrong...??
Printable View
I have been referred a few times to used the GetAsnc or something like that to read user input, but until now, mine dun seem to register this kind of code.
SO I have resorted to the
if keycode=vbKeyDown
that sort of thing....What did I do wrong...??
This was quoted by one of the users
As the other guy said, use the API call:
GetAsncKeyState()
then have som boolean switch that changes when GetAsncKeyState() is different from its previous value.
To check it against a previous value, just use another variable. I.e
a = GetAsncKeyState(40)
......Insert code
if GetAsncKeyState(40) <> a then BoolSwitch = NOT(BoolSwitch)
Whenver I type the above GetAsncKeyState it won't register in my VB. IS there anything wrong????
the function is GetAsyncKeyState. here's the declaration.
Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Long) As Integer