Solved

C# - Motion Tween on a Picturebox

Posted on 2007-03-29
3
1,174 Views
Last Modified: 2012-08-13
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!
0
Comment
Question by:Cyber-Drugs
3 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 18859124
There is no "canned" method in the .Net framework that does this.

You would have to write it yourself.  =(
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 18860311
That's what I was afraid of...

Cheers Idle_Mind! :o)
0
 

Expert Comment

by:Richard_S_Shepherd
ID: 24890763
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.

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now