Animated control movement.

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 318
Reputation: Diamonddrake is a jewel in the rough Diamonddrake is a jewel in the rough Diamonddrake is a jewel in the rough 
Solved Threads: 38
Diamonddrake's Avatar
Diamonddrake Diamonddrake is offline Offline
Posting Whiz

Animated control movement.

 
0
  #1
May 24th, 2009
I have a transparent panel control, I don't use double buffering because they clash, and it also interferes with some other controls that I am using. On my panel I have 9 buttons, I have written code to remove a button on its click event, and then move the to the right of the removed buttons all to the left to take the place of the removed button via a slide in animation style movement. I wrote a class that takes the end position, the start position and the amount of steps and moves the buttons using a timer, so to allow the program to handle all its events. I call refresh()in the tick as well on the panel and It works fine except it looks kinda bad, jittery kinda, just doesn't look smooth. Im using a stout machine so I know its not my ability to process it.

It there some standard to doing this kind of thing, would I get best results calling refresh on the panel, or the entire form? I have tried both, and it appears the same to me. But I'm not sure what programmatically yields less work on the system with the desired result.

some other stuff to take into consideration,
the form is actually 2 forms, one that is a layeredwindow for crisp transparent edges, the other, my actual form for holding controls. all the button controls contain images and text and are flat style. the form contains a gradient background image and multiple instance of forced transparent controls such as panels and labels.

any suggestions would be appreciated.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,908
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 273
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: Animated control movement.

 
0
  #2
May 25th, 2009
The only thing I can say is the less pixel territory you have to Refresh, the better.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC