computermom
New member
- Joined
- Apr 16, 2006
- Messages
- 2
- Programming Experience
- 1-3
Hi everyone....I am new here and I have a question concerning ....timers
Anyway, I have searched the forums to see if my question had already been answered so I would not worry anyone with the same ole timer question. I am creating a timer in vb.net using a timer class. I have also created a windows form that has a label that outputs the time in min:sec. The form also has a minute btn, a second btn, a stop btn, start btn and a clear btn. I have coded my minute, second btns. I am having problems with my start button. What I want to happen when I click the start button is I want the timer to decrement time. Say for instance, if the timer has 2:00, it will decrement to 1:59 all the way until it gets to 0. When it gets to zero, and there is no more time, the time stops. I notice in some of the discussions a system.timer was used. I don't want to use this, just manual coding. I have created a procedure called "decrementtime" that when the seconds=0 then the minutes will subtract 1. But in my program code, when it reaches say for instance :59 and start decrement all the way down to zero, it starts decrementing again at :59. I am not sure where my problem lies, but any information and help on this will be much appreciated. I apologize for the "same ole timer question".
computermom
Anyway, I have searched the forums to see if my question had already been answered so I would not worry anyone with the same ole timer question. I am creating a timer in vb.net using a timer class. I have also created a windows form that has a label that outputs the time in min:sec. The form also has a minute btn, a second btn, a stop btn, start btn and a clear btn. I have coded my minute, second btns. I am having problems with my start button. What I want to happen when I click the start button is I want the timer to decrement time. Say for instance, if the timer has 2:00, it will decrement to 1:59 all the way until it gets to 0. When it gets to zero, and there is no more time, the time stops. I notice in some of the discussions a system.timer was used. I don't want to use this, just manual coding. I have created a procedure called "decrementtime" that when the seconds=0 then the minutes will subtract 1. But in my program code, when it reaches say for instance :59 and start decrement all the way down to zero, it starts decrementing again at :59. I am not sure where my problem lies, but any information and help on this will be much appreciated. I apologize for the "same ole timer question".
computermom