Results 1 to 2 of 2

Thread: countdown

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 1999
    Location
    Schaumburg, Il USA
    Posts
    1

    Post

    how do i make a countdown from 10 with a one second interval with the decent of each number(the output will be in a label)

    ------------------
    Steve Z

  2. #2
    Member
    Join Date
    Nov 1999
    Posts
    33

    Post

    make a label on a form And create a timer on the form. Within the label set the caption to 10. Then go to the timer sub and make it look like this

    Private Sub Timer1_Timer()
    Dim Amount As Integer
    Amount = Val(Label1.Caption)
    If Amount = 0 Then
    Timer1.Enabled = False
    Else
    Amount = Amount - 1
    Label1.caption = Str$(Amount)
    End if
    End Sub

    For the timer properties set it to be enabled and the intervall to 1000 I believe thats 1 second i could be wrong though. But Anyways then it will do ur countdown =))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width