Results 1 to 5 of 5

Thread: countdown thingy

  1. #1

    Thread Starter
    Member shulc's Avatar
    Join Date
    Mar 2002
    Location
    cluster 15326
    Posts
    41

    Arrow countdown thingy

    how can i make a countdown of -30 to be displayed in a label?
    REALLY BAD & METAL MAD

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Private Sub Form_Load()
    2.     Timer1.Interval = 1000 '1 sec
    3.     Label1.Caption = 30
    4. End Sub
    5.  
    6. Private Sub Timer1_Timer()
    7.     Label1.Caption = Val(Label1.Caption - 1)
    8. End Sub
    -= a peet post =-

  3. #3
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180
    Add a timer to your form and a label. Then use this code:

    VB Code:
    1. Public Count As Integer
    2. Count = 30
    3. 'Add this to your timer:
    4.  
    5. If Count > 0 then
    6. Count = Count -1
    7. Label1.Caption = Count
    8. end if

    This would create a countdown from 30 to 0
    By setting the Timer's Interval you can set the speed.

  4. #4

    Thread Starter
    Member shulc's Avatar
    Join Date
    Mar 2002
    Location
    cluster 15326
    Posts
    41
    thanx!
    REALLY BAD & METAL MAD

  5. #5
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180
    Just to slow again ! Oh wel, doesn't matter. Peet's solution works better
    Last edited by Michael_Kamen; May 6th, 2002 at 05:39 AM.

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