Hi all, I need some info on moving an object randomly across the screen. For example, a circle that just randomly drifts all over the screen, at various angles.
Thanks in advance for ANY help!
Visual basic 2008 - Randomizing Movement
Page 1 of 13 Replies - 392 Views - Last Post: 07 December 2012 - 01:57 PM
Replies To: Visual basic 2008 - Randomizing Movement
#3
Re: Visual basic 2008 - Randomizing Movement
Posted 07 December 2012 - 12:48 PM
You need a timer and in it's tick event you change the PB's location like modi was saying. To test it if it against the border you check whether the Top, Left, Bottom, Right properties are at the edges of the rectangle it is in - if its in a form - Me.ClientRectangle would work.
#4
Re: Visual basic 2008 - Randomizing Movement
Posted 07 December 2012 - 01:57 PM
you will also need to set boundries or the item will continue to randomize off screen
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote








|