A multiple-choice exercise usually consists of single
answers. This can done using radio buttons. Another type of multiple-choice
application can be made of single and multiple answers. In such a program, the
user can be presented with two types of questions, some requiring one
answer out of many options, and some others allowing the user to select more
than one answer. When creating the application, you must find a way to alternate
the questions. Furthermore, you may want to randomly present the questions.
There are different ways you can do this.

If you want to create a multiple-choice application, you
must find a way to alternate questions. There are various ways you can do this.
You can create a series of radio buttons and check boxes. Then, when asking a
question that expects a single answer, you can present only the radio buttons.
When a question expects more than one answer, you can present the check boxes.
Because of the way controls are built, you can use group boxes to group controls
so that, when a series of controls is needed, you can display its corresponding
group of questions and hide the other group box.

Practical Learning: Creating the Questions

To add a new form, on the main menu, click Project -> Add Windows
Form...

In the Add New Item dialog box, set the Name QuestionAnswer

Click Add

Design the form as follows:

Control

Caption

Name

Additional Properties

Label

Question

lblQuestion

TextBox

txtQuestion

Multiline: True
ScrollBars:
Vertical

Group Box

grpSingleAnswers

Radio Button

rdoAnswer1

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

Radio Button

rdoAnswer2

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

Radio Button

rdoAnswer3

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

Radio Button

rdoAnswer4

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

Button

Quit

btnQuit

Button

Check Answer

btnCheckAnswer

Form

ShowInTaskbar: false

On the form, click the group box to select

On the main menu, click Edit -> Copy

To add another form, on the main menu, click Project -> Add Windows
Form...

In the Add New Item dialog box, set the Name Experiment and press
Enter

Enlarge the form enough and, on the main menu, click Edit -> Paste

Design the form as follows:

Control

Caption

Name

Additional Properties

Group Box

grpMultipleAnswers

CheckBox

chkAnswer1

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

CheckBox

chkAnswer2

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

CheckBox

chkAnswer3

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

CheckBox

chkAnswer4

AutoSize: False
CheckAlign: TopLeft
TextAlign: TopLeft

On the Experiment form, click the group box to select it

On the main menu, click Edit -> Copy

Display the QuestionAnswer form

Click an unoccupied area of the form to make sure no control (especially
not the group box) is selected

On the main menu, click Edit -> Paste (the idea is to make sure that
one group box doesn't act as the parent control of another group box;
otherwise, the application may not produce the intended result)

Move the new group box to place it exactly on top of the other group box