Home All Groups Group Topic Archive Search About
Author
21 Feb 2006 3:42 AM
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

Author
21 Feb 2006 7:16 AM
Cor Ligthert [MVP]
Sheep Shagger,

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

Cor

Show quoteHide quote
"Sheep Shagger" <sh***@shagger.net> schreef in bericht
news:%23sdLkjpNGHA.2528@TK2MSFTNGP12.phx.gbl...
> 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
>
>
Author
21 Feb 2006 9:45 AM
m.posseth
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]


Show quoteHide quote
"Sheep Shagger" <sh***@shagger.net> wrote in message
news:%23sdLkjpNGHA.2528@TK2MSFTNGP12.phx.gbl...
> 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
>
>
Author
21 Feb 2006 11:40 AM
NickP
> Sheep Shagger     :-)   ( are you Irish  ???   )

Irish??? Don't you mean Welsh? or a Kiwi?

Nick.