Click to See Complete Forum and Search --> : Timer control interrupt


NiteStone
January 25th, 2000, 11:45 PM
Hello,

Can you help me how to pause a timer to allow user more time to a specific task then to resume the timer? Any help is appreciated. And Thanks!

NiteStone

Ruth Glushkin
January 26th, 2000, 12:39 AM
You can change in run-time the property Enabled of the Timer control.
Timer1.Enabled = True means, that timer is opened and "works"
Timer1.Enabled = False means, that timer is "paused".

Good Luck!

NiteStone
January 26th, 2000, 02:07 AM
Hi there,

Thank you for the reply. I have used this method too. But I am not happy with the performing. Suppose that timer.interval = 30s and I click on Resume button after i clicked on Pause button, it takes almost the interval time to resume. It is too slow. Is there other method to use to avoid the delay problem? Any suggestion is appreciated and Thanks.

NiteStone

Ruth Glushkin
January 26th, 2000, 02:13 AM
Instead of Timer Control use API Function GetTickCount(), which will allow you to work according
to cycles of your Processor.

Good Luck!

NiteStone
January 27th, 2000, 12:14 AM
Thanks, Ruth, for the help and your time. Cause I already used timer control and really lazy to make change, I found a little trick to get arround the problem: put the excute statements of next task into the resume command. It works. I wonder if there is a way to look into timer control to see how it implements.

Have a nice day,

NiteStone