|
-
Feb 16th, 2007, 12:24 PM
#1
Thread Starter
Lively Member
[RESOLVED] timer control
How can i make a program do this:
- check during 20 secs if an answer is correct
- if the answer is correct or not, do something
I'm not sure how i can use a Timer control for this.
-
Feb 16th, 2007, 12:27 PM
#2
Re: timer control
Do you have the code to check to see if an answer is correct?
If so, just place in the Timer1_Timer event, and set the Timers interval. It will execute whatever code is in its Timer event when the interval you have set elapses.
-
Feb 16th, 2007, 12:32 PM
#3
Thread Starter
Lively Member
Re: timer control
that would mean when, after the 20 secs are over, it'll check the code in the timer1_timer event if the answer is right, but:
it's supposed to check within those 20 sec
-
Feb 16th, 2007, 12:35 PM
#4
Re: timer control
 Originally Posted by Ethan37
that would mean when, after the 20 secs are over, it'll check the code in the timer1_timer event if the answer is right, but:
it's supposed to check within those 20 sec
At what point is it supposed to know that it should check?
-
Feb 16th, 2007, 12:36 PM
#5
Thread Starter
Lively Member
Re: timer control
immediately after the question is asked
-
Feb 16th, 2007, 12:44 PM
#6
Re: timer control
The question is presented on the screen.
How does it get answered?
Are there mutliple choice option buttons?
A textbox into which answers are typed and then a submitt button is clicked?
Some other way?
-
Feb 16th, 2007, 12:47 PM
#7
Thread Starter
Lively Member
Re: timer control
actually, my program checks incoming strings from an irc-server if the answer is right
but it's alright to say it's a textbox input
-
Feb 16th, 2007, 12:55 PM
#8
Re: timer control
Ok....in that case, as soon as the string is put in the textbox its Change event should fire.
I would put the code to check the answer there and see how that works.
-
Feb 16th, 2007, 01:07 PM
#9
Thread Starter
Lively Member
Re: timer control
ok, and combining that with a timer event that will, after twenty secs say: time's up if the answer is not given, and if the answer is given the timer interval will be set to 0.
I'll try that
thx
-
Feb 16th, 2007, 01:19 PM
#10
Re: timer control
How long do they have to submit an answer?
Can they change their mind? (I.E., the anwer to question one is Cabbage. But, instead of that I type in Cole Slaw, and as soon as I send I realize my mistake, and put Cabbage in and send that. Is this possible?)
-
Feb 17th, 2007, 08:55 AM
#11
Thread Starter
Lively Member
Re: [RESOLVED] timer control
yes, that's the case. you have 20 seconds to enter answers and it doesn't have to be right at once. you can enter another answer and it will check if its' the right answer
if its wrong you get a hint after 20 secs, if its right you get the next question
I managed to use the timer for the program to wait to give a hint.
Using a counter for the hints (max.4), the Timer.interval will be reset to zero.
Then the next question will be displayed.
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
|