PDA

Click to See Complete Forum and Search --> : moving images/ collision detection


pnj
Feb 1st, 2001, 04:03 PM
all I want to know is what is the easyist way to move an image on my form?
then how do I tell if it 'hits' something?

thanks

RickNiceButThick
Feb 1st, 2001, 04:36 PM
To move the picture box you could put these in a timer. To start/stop it Enable/Disable the timer. To change the speed change the interval of the timer

'Move Up:
Picture1.Top = Picture1.Top - 10

'Move Down:
Picture1.Top = Picture1.Top + 10

'Move Left:
Picture1.Left = Picture1.Left - 10

'Move Right:
Picture1.Left = Picture1.Left + 10

You could use combonations of these, and change the 10 to make the picture move in different angles.

SteveCRM
Feb 1st, 2001, 05:13 PM
There are TONS of collision detection threads...do a search for them...I've replied to most. :D