|
-
May 6th, 2002, 04:25 AM
#1
Thread Starter
Member
countdown thingy
how can i make a countdown of -30 to be displayed in a label?
-
May 6th, 2002, 04:28 AM
#2
-= B u g S l a y e r =-
VB Code:
Private Sub Form_Load()
Timer1.Interval = 1000 '1 sec
Label1.Caption = 30
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Val(Label1.Caption - 1)
End Sub
-
May 6th, 2002, 04:31 AM
#3
Banned
Add a timer to your form and a label. Then use this code:
VB Code:
Public Count As Integer
Count = 30
'Add this to your timer:
If Count > 0 then
Count = Count -1
Label1.Caption = Count
end if
This would create a countdown from 30 to 0
By setting the Timer's Interval you can set the speed.
-
May 6th, 2002, 04:32 AM
#4
Thread Starter
Member
-
May 6th, 2002, 04:36 AM
#5
Banned
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|