|
-
Dec 5th, 2011, 11:33 AM
#1
Thread Starter
Junior Member
How to make a picturebox move?
I am wondering how to create an animation to move a picturebox without any user interaction such as mouse or keyboard.
I need to move a picture box by a set of pre determined location paths.
for example: move the object from location (20,50) to location (70,100)
Thanks in advance
-
Dec 5th, 2011, 12:35 PM
#2
Re: How to make a picturebox move?
If neither the mouse nor keyboard is being used, how does the picture box know it is supposed to move?
-
Dec 5th, 2011, 12:48 PM
#3
Thread Starter
Junior Member
Re: How to make a picturebox move?
 Originally Posted by Hack
If neither the mouse nor keyboard is being used, how does the picture box know it is supposed to move?
I meant I want to tell the picture box were to go from actual code. giving start point and destination point
-
Dec 5th, 2011, 02:38 PM
#4
Re: How to make a picturebox move?
Most languages have a left, top property for their controls. In addition, they generally have a Move method, whether called Move or something else. So... picBox.Move x, y
Don't know if .Net's control's have a Move method or not. If not, it is named something similar like Position or Location for example
You'll probably also want a timer control that when the timer event triggers, you move your picturebox to the next set of coordinates. I'm sure you can find examples of timer usage in the .Net portion of the forums
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|