How to effectively use a timer for animation?
Hello there.
My question is how can i use a timer function to animate a form's width being smoothly expanded and contracted on the click of a button
The resultant effect that i'm looking for is exactly what happens when you run windows native calculator
1.Windows + R key. Run: "Calc"
2. Change the views from View option between "Standard" and "Scientific".
Any ideas?
P.S - I've tried declaring two subs, using width += ## and width -= ##, but that doesnt output what i want, it just messes up things..
Re: How to effectively use a timer for animation?
You apparently did it wrong because it works fine for me. As we haven't seen what you did, we can't say what you did wrong.
Re: How to effectively use a timer for animation?
I have encountered problems when i change the width += 1 to some other number like
width += 10 or 15. Can you explain me why? As all i was trying to do is increase the speed of the animation, because the least that you can get on the timer is 1ms, which is surprisingly slow to increase / decrease the form's width.
Re: How to effectively use a timer for animation?
You are again expecting us to divine information using ESP. How can I explain why you get problems when I don't know what problems you get? Try providing a FULL and CLEAR description of the problem that includes ALL the relevant information. Relevant code snippets and error messages are appropriate if they are available.