Timer control 
Author Message
 Timer control

I have a timer control running on a period of a minute (60 * 1000) in
multiple mode.  I realize the period begins when the control is created.  Is
there a way to "reset" or "restart" the timer so that the first action event
will be fired one period after the "reset"?  I think resetting the timer's
period will do the trick but I'm unsure.

Thanks,

--
James Coole
Please post request for email.



Sun, 02 May 2004 10:52:01 GMT  
 Timer control

Quote:

> I have a timer control running on a period of a minute (60 * 1000) in
> multiple mode.  I realize the period begins when the control is created.  Is
> there a way to "reset" or "restart" the timer so that the first action event
> will be fired one period after the "reset"?

Yes, assign to the period or mode.

Quote:
> I think resetting the timer's period will do the trick but I'm unsure.

You're correct, though if it were me, I'd code defensively and set the
mode to 0, then back to 2.  That will pretty much guarantee that the
timer has to start counting over again.

Cheers,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout         Check out the Mac Web Directory:     |

`------------------------------------------------------------------'



Sun, 02 May 2004 13:12:20 GMT  
 Timer control

Quote:

> I have a timer control running on a period of a minute (60 * 1000) in
> multiple mode.  I realize the period begins when the control is created.  Is
> there a way to "reset" or "restart" the timer so that the first action event
> will be fired one period after the "reset"?  I think resetting the timer's
> period will do the trick but I'm unsure.

Im not sure I understand you question.
It sounds like you're saying when the timer is created or its mode set to
multiple its action fires immediately and then after every period. But thats
how it works for me. If it didnt, then single mode would fire twice, at the
beginning and end of the period.

Oh wait. Your saying that if the timers 20 seconds into its minute long
period you want to start over at 0, hence the reset; duh Im a little slow
some nights.

OK for that use this code
Timer1.Mode = 0
Timer1.Mode = 2
This basically turns it off then immediately starts it again, giving you the
reset. In my test, setting the Period didnt reset.
HTH
-Laz



Sun, 02 May 2004 13:35:54 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Something like Timer Control in VB

2. Timer Control

3. Timer Control and Alarm - Warning extreme Newbie

4. Dynamic adding of timer control

5. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

6. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

7. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

8. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

9. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

10. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

11. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

12. The IBM-PC 8253 Timer - What do the three outputs of the timer control?

 

 
Powered by phpBB® Forum Software