Link to home
Start Free TrialLog in
Avatar of Cyber-Drugs
Cyber-DrugsFlag for United Kingdom of Great Britain and Northern Ireland

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(LocationB, 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!
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cyber-Drugs

ASKER

That's what I was afraid of...

Cheers Idle_Mind! :o)
Avatar of Richard_S_Shepherd
Richard_S_Shepherd

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(Picturebox1, "Left", 100, new TransitionType_Linear(1000));
to animate the left of the picture to position 100 over 1000ms.