Multiple Choice
Identify the
letter of the choice that best completes the statement or answers the question.
|
|
1.
|
You can use
the ____ function to tell Visual Basic to treat a character string as a number.
|
|
2.
|
You can use
the ____ method to set the focus to a form or a control while the application is
running. a. | ControlFocus | b. | SetFocus | c. | Focus | d. | Control | | |
|
|
3.
|
Which of the
following tells Visual Basic to treat the contents of the txtNum control as a number instead of as a
string? a. | val(txtNum.Caption) | b. | val(txtNum.Text) | c. | num(txtNum.Text) | d. | num(txtNum.Caption) | | |
|
|
4.
|
To clear the
contents of a text box, assign a zero-length string to its ____ property. a. | Text | b. | Caption | c. | Label | d. | Contents | | |
|
|
5.
|
To assign an
access key to a control, enter a(n) ____ to the immediate left of the character that you want to
designate as the access key. a. | ampersand (&) | b. | caret
(^) | c. | exclamation point
(!) | d. | asterisk
(*) | | |
|
|
6.
|
Which
assignment statement will hide a cmdCalc control? a. | cmdCalc.Appearance = False | b. | cmdCalc.Visible =
False | c. | cmdCalc.Visible = True | d. | cmdCalc.Appearance=True | | |
|
|
7.
|
To document
a program internally, place a(n) ____ before the statement you want Visual Basic to treat as a
comment. a. | apostrophe
(') | b. | asterisk
(*) | c. | percent sign
(%) | d. | dollar sign
($) | | |
|
|
8.
|
A string is
a group of characters enclosed in ____. a. | asterisks (*) | b. | quotation marks
(") | c. | apostrophes (') | d. | dollar signs
($) | | |
|
|
9.
|
____ refers
to the process of locating errors in a Visual Basic program. a. | Compiling | b. | Debugging | c. | Correcting | d. | None of the above | | |
|
|
10.
|
A
zero-length string is also called a(n) ____ string. a. | empty | b. | no-length | c. | small set | d. | open | | |
|