[RESOLVED] where should i put GetAsyncKeyState at
hey yall when moving something with arrow keys and i call other functions from inside checkplayinput function ,sometimes vb6 will lockup is there a better way or would it be better to put the checkplayinput code in the run function?
many thanks
Code:
Sub Run()
While Running
Call CheckPlayInput
DoEvents
Wend
End Sub
Code:
Private Function CheckPlayInput()
If GetAsyncKeyState(vbKeyUp) < 0 Then
End If
If GetAsyncKeyState(vbKeyDown) < 0 Then
End If
If GetAsyncKeyState(vbKeyLeft) < 0 Then
End If
If GetAsyncKeyState(vbKeyRight) < 0 Then
End If
End Function
Re: where should i put GetAsyncKeyState at
ok so i put it inside the run sub seems to work a little beter