How do I move a picture from top to bottom and then get it in other coordinates?
I will explain my problem more clearly: I want the image to start at the top right corner of the form and go down, then appear at the top in other coordinates, for example (370,0), and go down again.
I wrote the code, but it just goes down and I don't know how to proceed.
What I have tried:
timer = new System.Threading.Timer(Callback, null, 0, 50);
private void Callback(object state)
pictureBox1.Location = new Point(0, pictureBox1.Location.Y + dtY);
// when it touches the bottom of the container
if (pictureBox1.Location.Y + pictureBox1.Size.Height >
// we already reset once, so no more going back up: stop the timer
// we did not reset yet, so go to other coordinates for example(370,0)
resetOnce = true;
pictureBox1.Location = new Point(370,0);