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
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?
Re: How to make a picturebox move?
Quote:
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
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