PDA

Click to See Complete Forum and Search --> : Moving Walls


LeoNcosta
Aug 15th, 2000, 03:40 PM
Hi

I'm making a game that will some part use a caracter that goes insed a house and i need to make the walls move while the user hold the arrowUp. any answer is apreciable.

thanks

Aug 15th, 2000, 04:10 PM
To make things respond to keys, use GetAsyncKeyState.

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

Private Sub Timer1_Timer()
'Move MyTile up while the Up-Arrow key is pressed
If GetAsyncKeyState(vbKeyUp) Then MyTile.Top = MyTile.Top + 15
End Sub