newbie needing help

soccerprogramer
09-08-2003, 08:21 PM
I am new to visual basic, and I am working on a little program that is a test, designed for the local soccer referees to be tested for recertification in the local soccer league. The program is very basic: 15 questions: a label where the question appears, 4 check boxes where the answers to the question are, and 1 command button listed "ok". Once the referee reads the question, he/she selects one of the answers, and clicks ok, then a message box appears sayin whether it is correct or not.

How can I start this? I made the form; but am confused on how to program the questions and how to switch from question to question, after hitting the ok button the msg box. Any help will be appreciated

DroopyPawn
09-08-2003, 08:52 PM
Sounds like a fairly simple app to write. I would use the radio tool (or maybe command buttons) instead of the check box. Check boxes could create confusion because more than one could be checked. I'd think your questions would only have one answer. Multiple choice, right?

Create a text file to keep the questions, unless you want to hard code them into the program - less flexible.

Create a type to keep up with the questions and possible answers. Something like this....

Type QuestionType
Question as string
Answer1 as string
Answer2 as string
Answer3 as string
Answer4 as string
CorrectAnswer as string
End Type


Type go in modules. You'll have to add a module to your project.

Create an array of QuestionType.

When the program starts, open the question file and read the questions and answers from it.

Create a CurrentQuestion variable and set it to 1 and display the first question and it's answers.

Whenever the user hits the "Go" button, or picks an answer (however you want to do it) increment CurrentQuestion by 1. Check to see if the last question has been reached after each answer.

After the last question, display the results, including any incorrect answers. I imagine you'll also want to randomize where the answers apear to avoid folks memorizing the correct order of answers.

Then, if you give up, send me $19.95 and I'll write it for you.

rajeeshun
09-08-2003, 09:35 PM
I am new to visual basic, and I am working on a little program that is a test, designed for the local soccer referees to be tested for recertification in the local soccer league. The program is very basic: 15 questions: a label where the question appears, 4 check boxes where the answers to the question are, and 1 command button listed "ok". Once the referee reads the question, he/she selects one of the answers, and clicks ok, then a message box appears sayin whether it is correct or not.

How can I start this? I made the form; but am confused on how to program the questions and how to switch from question to question, after hitting the ok button the msg box. Any help will be appreciated



...Ok
You Need more basic coding knowledge to complete your project. Where are you going to keep (store) the correct answers ? I think If you use Database/Text file to store the asnwer, it wud be better (But not must... you can simply hardcode it)

If you use Db/text file you can simply use "Randomize" function to select the question one by one.

Ask the question one by one.. more more specific. like... "How to select question one by one" , "How to show messagebox"... the you cud get good output

DroopyPawn
09-08-2003, 09:53 PM
NO problem with randomizing from my end. Except you need to be sure that ALL the questions get asked. This is an umpire test.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum