![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2006
Location: Ohio
Posts: 22
Rep Power: 0
![]() |
timer
i was just wondering if you could program a timer that counts down? like a countdown for a game to come out. :banana:
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
yes..
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2006
Location: Ohio
Posts: 22
Rep Power: 0
![]() |
Well can you tell me how...........
|
|
|
|
|
#4 |
|
Sexy Programmer
|
I'll post the code when I get home, It's rather easy to accomplish!
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
#5 | |
|
Newbie
Join Date: Feb 2006
Location: Ohio
Posts: 22
Rep Power: 0
![]() |
Quote:
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
something like this...
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = "100"
End Sub
Private Sub Timer1_Timer()
if label1.caption = 0 then
timer1.enabled = false
msgbox ("100 secs is up")
else
Label1.Caption = label1.caption - 1
end if
End Sub
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
#7 |
|
Sexy Programmer
|
' // Chris Soubasis
' // Timer program
' // 2/5/06
Option Explicit
Dim StartTime As Variant
Dim EndTime As Variant
Dim ElaspedTime As Variant
Private Sub Form_Load()
cmdStart.Enabled = True
cmdStop.Enabled = False
End Sub
Private Sub cmdReset_Click()
cmdStart.Enabled = True
cmdStop.Enabled = False
lblStart.Caption = ""
lblEnd.Caption = ""
lblElapsed.Caption = ""
End Sub
Private Sub cmdStart_Click()
StartTime = Now
lblStart.Caption = Format(StartTime, "hh:mm:ss")
lblEnd.Caption = ""
lblElapsed.Caption = ""
cmdStart.Enabled = False
cmdStop.Enabled = True
End Sub
Private Sub cmdStop_Click()
EndTime = Now
ElaspedTime = EndTime - StartTime
lblEnd.Caption = Format(EndTime, "hh:mm:ss")
lblElapsed.Caption = Format(ElaspedTime, "hh:mm:ss")
cmdStart.Enabled = True
cmdStop.Enabled = False
End Sub
Private Sub cmdExit_Click()
End
End Sub
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
#8 |
|
Newbie
Join Date: Feb 2006
Posts: 10
Rep Power: 0
![]() |
hey quagmire...i've been looking at all your posts and you seem to be obssessed with the banana (not to mention it makes certain "people" very angry). Can we refrain from anymore of these: :banana: . Please, I'm begging you, you're driving me insane!!!!!!!!!!!
(Excessive banana's removed) If you don't stop I'll sick my army of bananas upon thy flesh!!!! Ha, ha, ha!!! Last edited by big_k105; Mar 7th, 2006 at 10:15 AM. |
|
|
|
|
#9 |
|
Newbie
Join Date: Feb 2006
Posts: 10
Rep Power: 0
![]() |
Hey, that is kind of addicting...
(Excessive banana's removed) Last edited by big_k105; Mar 7th, 2006 at 10:14 AM. |
|
|
|
|
#10 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Is that's supposed to be funny, or is it spamming the forum, or are you just retarted, or...
Tell us, and then leave. |
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|