Countdown Timer

  • Thread starter Thread starter Sheep Shagger
  • Start date Start date
S

Sheep Shagger

Hello all

This is driving me crazy. I am trying to write a small program that when
started counts down from 16:30

heres what I mean:-

say I launch the programme at 10:00 then i've like to show how long left
before 16:30 in a lable controll. in this case is 6.5 hours

start programme time:- 10:00
finish time:- 16:30
time between the two time:- 6.5 hours
but I could start the programme any tyme day or night and it wont be
constante tyme

how to show a countdown of this in a lable controll

how do i do this

sory for my englisch

tank you
 
Sheep Shagger,

I think that to help you with this you have to show some code how you did
it.

Cor
 
Sheep Shagger :-) ( are you Irish ??? )


Dim DtRef As New DateTime(Now.Year, Now.Month, Now.Day, 16, 30, 0)

Dim DtCurrent As DateTime = Date.Now

Dim diff1 As System.TimeSpan

diff1 = DtRef.Subtract(DtCurrent)

If diff1.TotalMilliseconds < 0 Then

DtRef.AddDays(1)

diff1 = DtRef.Subtract(DtCurrent)

End If

MsgBox(diff1.Duration.Hours & " Hours : " & diff1.Duration.Minutes & "
Minutes : " & diff1.Duration.Seconds & " Seconds : " & " Untill 16:30")


call above in a timer and bind the values to a label

regards

Michel Posseth [MCP]
 

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

Back
Top