can someone do the explanation as to why the left & right here work, but the up & down don't ???
Doesn't make sense to me. ThanksCode:Private Declare Function GetKeyState Lib "user32.dll" (ByVal nVirtKey As Long) As Integer Private Sub Timer1_Timer() If GetKeyState(vbKeyLeft) And &H8000 Then Picture1.Left = Picture1.Left - 20 If GetKeyState(vbKeyRight) And &H8000 Then Picture1.Left = Picture1.Left + 20 If GetKeyState(vbKeyUp) And &H8000 Then Picture1.Left = Picture1.Top - 20 If GetKeyState(vbKeyDown) And &H8000 Then Picture1.Left = Picture1.Top + 20 End Sub![]()




Reply With Quote