Cyber-Drugs
asked on
C# - Motion Tween on a Picturebox
Hi guys 'n gals,
I wanted to know if there are any pre-made functions within C# (2005), or if it's easy enough to create a motion-tween effect.
Basically, I have LocationA, LocationB and a Picturebox (which is in LocationA). I want to basically do something like this:
Picturebox1.MotionTween(Lo cationB, 5)
MotionTween will make Picturebox1 move (so you can see the movement, rather than it just instantly moving from one place to another), the "5", would be how many seconds it should take for this motion to happen.
Anyone know of anything like this?
Cheers!
I wanted to know if there are any pre-made functions within C# (2005), or if it's easy enough to create a motion-tween effect.
Basically, I have LocationA, LocationB and a Picturebox (which is in LocationA). I want to basically do something like this:
Picturebox1.MotionTween(Lo
MotionTween will make Picturebox1 move (so you can see the movement, rather than it just instantly moving from one place to another), the "5", would be how many seconds it should take for this motion to happen.
Anyone know of anything like this?
Cheers!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The .NET Transitions library does what you want:
http://code.google.com/p/dot-net-transitions/
You can write a line of code like this:
Transitions.run(Picturebox 1, "Left", 100, new TransitionType_Linear(1000 ));
to animate the left of the picture to position 100 over 1000ms.
http://code.google.com/p/dot-net-transitions/
You can write a line of code like this:
Transitions.run(Picturebox
to animate the left of the picture to position 100 over 1000ms.
ASKER
Cheers Idle_Mind! :o)