-
Apr 24th, 2012, 12:46 AM
#1
Thread Starter
New Member
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..
Last edited by niksh19; Apr 24th, 2012 at 12:50 AM.
-
Apr 24th, 2012, 01:03 AM
#2
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.
-
Apr 24th, 2012, 01:24 AM
#3
Thread Starter
New Member
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.
-
Apr 24th, 2012, 01:45 AM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|