Countdown Timer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sheep Shagger

    #1

    Countdown Timer

    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


  • Cor Ligthert [MVP]

    #2
    Re: Countdown Timer

    Sheep Shagger,

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

    Cor

    "Sheep Shagger" <sheep@shagger. net> schreef in bericht
    news:%23sdLkjpN GHA.2528@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > 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
    >
    >[/color]


    Comment

    • m.posseth

      #3
      Re: Countdown Timer


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


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

      Dim DtCurrent As DateTime = Date.Now

      Dim diff1 As System.TimeSpan

      diff1 = DtRef.Subtract( DtCurrent)

      If diff1.TotalMill iseconds < 0 Then

      DtRef.AddDays(1 )

      diff1 = DtRef.Subtract( DtCurrent)

      End If

      MsgBox(diff1.Du ration.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]


      "Sheep Shagger" <sheep@shagger. net> wrote in message
      news:%23sdLkjpN GHA.2528@TK2MSF TNGP12.phx.gbl. ..[color=blue]
      > 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
      >
      >[/color]


      Comment

      • NickP

        #4
        Re: Countdown Timer

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

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

        Nick.


        Comment

        Working...