• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1193
  • Last Modified:

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?

1 Solution
Mike TomlinsonMiddle School Assistant TeacherCommented:
There is no "canned" method in the .Net framework that does this.

You would have to write it yourself.  =(
Cyber-DrugsAuthor Commented:
That's what I was afraid of...

Cheers Idle_Mind! :o)
The .NET Transitions library does what you want:

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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now