I'm making a maths game and i want to put in a timer so they have to answer the question within 10secs and if they run out of time the next question pops up.
Printable View
I'm making a maths game and i want to put in a timer so they have to answer the question within 10secs and if they run out of time the next question pops up.
Okay so just add a timer with interval = 10000
.. or use the timer() function ->
VB Code:
Dim RegTimer As Single RegTimer = Timer Do While Timer - RegTimer < 2 'Wait 2 Sec. Loop MsgBox "You are too late.. :)"
That code will have a process utilization of 99% though.Quote:
Originally posted by Jim Davis
.. or use the timer() function ->
VB Code:
Dim RegTimer As Single RegTimer = Timer Do While Timer - RegTimer < 2 'Wait 2 Sec. Loop MsgBox "You are too late.. :)"
Using a timer will not.
youre right.. sorry :)Quote:
Originally posted by plenderj
That code will have a process utilization of 99% though.
Using a timer will not.
Jim.
Is the timer on the screen, I mean is there a countdown clock.
If there s then you can just use a timer with a 1000 interval and have a code of:
if label1.caption < 10 then
label1.caption = label1.caption - 1
end if
if label1.caption = 0 then
msgbox, etc.
end if
110359