Results 1 to 2 of 2

Thread: Moving Walls

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    USA, Florida
    Posts
    10

    Question

    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

  2. #2
    Guest
    To make things respond to keys, use GetAsyncKeyState.
    Code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width