Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Moving Shapes With Timers
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DoomAdvocate




PostPosted: Fri Jun 09, 2006 6:59 pm   Post subject: Moving Shapes With Timers

What is the easiest way to move a shape using the Shape.move property? I'm trying to simulate fireworks using small circles. Just a little nudge in the right direction is all I need, thanks. I'm just not sure how to adjust the top and left properties... Much appreciated.
Sponsor
Sponsor
Sponsor
sponsor
cool dude




PostPosted: Fri Jun 09, 2006 8:32 pm   Post subject: (No subject)

its very simple! basically make a timer and use something like this:

code:

Shape1.Move Shape1.Left + 10, Shape1.Top - 100


make sure u give your timer an interval i.e. 10. then everytime u want to move it right u add i.e.10 or left u subtract i.e. 10. if u don't want to move it left u just say shape1.left without adding anything or subtracting. then pretty much the same with making the circle go up. if u want it to go up u subtract and if u want it to go down u add. and if u don't want it to go up or down then don't add or subtract.

hope that helps
DoomAdvocate




PostPosted: Fri Jun 09, 2006 8:45 pm   Post subject: (No subject)

Thanks for the tip. I had it a bit off.. I was doing:

code:

Shape1.Move Shape1.Left = Shape1.Left + 10, etc


So, now it should work. Thanks.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: