Hi, Guys!
How can I set false all the GetAsyncKeyState() keys?
Sometimes I get some True values...
I want something like reseting all keys...
Thank you,
Arie. (mag.up.co.il)
Printable View
Hi, Guys!
How can I set false all the GetAsyncKeyState() keys?
Sometimes I get some True values...
I want something like reseting all keys...
Thank you,
Arie. (mag.up.co.il)
You can't reset the "GetAsyncKeystate()" value, (although I suppose you could use the "SetKeyboardState()" API, but it's unnecessary.)
If you're just concerned with the inital spurt of key state triggers you can get starting an application, then just do something like this when your application starts:VB Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Sub Form_Load() Dim lKey As Long Do While lKey < 256 For lKey = 0 To 255 If GetAsyncKeyState(lKey) Then Exit For Next DoEvents Loop End Sub