Countdown/pause/resume timer

J

JimJam

Hello Peeps

I have created a program in VB.NET 2003 that counts down from 7.5 hours to
zero from 08:00. I have a button that starts a new countdown from 1 hour to
zero whilst the first one is couting down from 7.5 hours.

How do I pause that time that is counting down from 1 hour & behind a new
button restart it without losing one second?

I would also like the time to count down from 37 hours, but will pause after
7.5 hours until 08:00 the next day.

Here's a recap:

1) Time now counting every second
2) Time from 08:00 + 7.5 hours counting down (16:30 to 08:00)
3) 1 Hour starting from a button press counting down to zero
4) Another button which can pause the 1 hour countdown (see 3 above)
5) Timer that starts at 08:00 on Monday counting down from 37 hours, which
pauses each day at 16:30 & restarts the next day at 08:00 until it reaches
00:00 (Friday afternoon at 16:30)

Four labels:

Label 1 = number 1 above (example: Dim dt As DateTime =
DateTime.Now.ToLongTimeString : Label1.Text = dt.ToString)
Label 2 = number 2 above
Label 3 = number 3 & 4 above
Label 4 = number 5 above

Any ideas as Im pulling my hair out over this one

TIA

JimJam
 
H

Homer J Simpson

I have created a program in VB.NET 2003 that counts down from 7.5 hours to
zero from 08:00. I have a button that starts a new countdown from 1 hour
to
zero whilst the first one is couting down from 7.5 hours.

How do I pause that time that is counting down from 1 hour & behind a new
button restart it without losing one second?

This is VERY hard to follow!
 
C

Cerebrus

He he !

Well, atleast I wasn't the only one who couldn't make head or tail of
the question.

Regards,

Cerebrus.
 
C

Cor Ligthert [MVP]

JimJam,

In my idea is this just use the DateTime, in that the method
DateTime.AddWhatever(negative) and this in a normal form timer event that
you have dragged on your form.

However I don't start a sample for you, that you have to do yourself.

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top