Hi,
I want to make an object move from A to B in a fluid animation. I know how to make it's position change, but after that, i'm lost. I know I have to use a timer, but don't know exactly how. Can anyone help me ?
Thank you!
Hi,
I want to make an object move from A to B in a fluid animation. I know how to make it's position change, but after that, i'm lost. I know I have to use a timer, but don't know exactly how. Can anyone help me ?
Thank you!
In win forms, you will have to specify the new position. The human eye recognize 25 pictures for second, so you will have to move the picture 25 times per second (per few inches every move).
In TimerTick event you have to execte the move. You can do your own method, which will be called from timerTick event. In this method you create some conditions, like when the object reaches XX,YY has to turn down, when object reaches XX,YY has to turn left, and so on... and on every step of the way you define a new location, which you then assign to the object (myObject.Location = new Point(XX, YY);).
Thats it.
Mitja
use two timers timer1 and timer2. Set intervals make timer1 enable but timer two disable. now in function timer1_tick move your object to point-1 and enable timer2 and disable timer1 now do it vise verse for point-2
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.