A+ Answers

1.      The following statement will insert str into the list box at the proper sorted position and assign to num the index of that position provided that one of the following has also occurred.  Which one of these properties must also have been set to al
num = lstbox.Items.Add(str)
a.         the Sorted property of the list box has been set to False
b.         the Count property of the list box has been set to Sorted
c.         the Sorted property of the list box has been set to Alphabetical
d.         the Sorted property of the list box has been set to True
2.         The following statement causes the Open dialog box to become visible on the form.
OpenFileDialog1.ShowDialog()
After a file has been selected and the Open button is pressed, the value of
OpenFileDialog1.FileName
will be the file’s filespec; this will include all of the following except:
a.         the file’s drive.
b.         the file’s date of creation.
c.         the file’s path.
d.         the file’s extension.
3.         Which of the following techniques does NOT always toggle the checked and unchecked state of a check box control?
a.         Click on the square or its caption with the mouse
b.         Press the spacebar when the square has the focus
c.         Press Alt+Access key (if an access key has been specified
d.         Set the Checked property equal to 1
4.         The distance that the scroll box of a scroll bar will move when an arrow on the scroll bar is clicked is determined by _____.
a.         LargeChange
b.         SmallChange
c.         Value
d.         Maximum
5.         When the user clicks on a check box control at run time, which one of the following events is triggered (in addition to the Click event)?
a.         ControlAdded
b.         Invalidated
c.         StyleChanged
d.         CheckedChanged
6.         A check box control named chkFirst contains the following code in its CheckedChanged event procedure.  Which of the following is true concerning the use of this control?
Dim message As String = “hello”
MessageBox.Show(message)
a.         The message “hello” will appear when the user checks the control but not when it is unchecked
b.         The message “hello” will appear when the user unchecks the control but not when it is checked
c.         The message “hello” will appear when the user checks the control again when it is unchecked
d.         The message “hello” will not appear using this source code
7.         A radio button named radButton is placed on a form, and the statement MessageBox.Show(radButton.Checked) is placed in its CheckedChanged event procedure.  At run time, what result will be displayed in the message box when the user clicks on radButton?
a.         1
b.         True
c.         2
d.         False
8.         In order to begin timing with the timer control, which one of the following must be true?
a.         The timer control’s Name property must include the prefix tmr
b.         The timer control’s Interval property must be set to 1
c.         The timer control’s Enabled property must be set to False
d.         The timer control’s Enabled property must be set to True
9.         In the following statement which term is used to designate the distance (in pixels) from the left side of the picture box to the left side of the rectangle?
picBox.CreateGraphics.DrawRectangle(Pens.Blue, x, y, w, h)
a.         h
b.         w
c.         y
d.         x
10.       A form contains a horizontal scroll bar control named hsbXpos, and the statement lblFace.Top = hsbXpos.Value is placed inside the hsbXpos.Scroll event procedure (where lblFace identifies a label on the form, and the hsbXpos’s Minimum and Maximum properties are set at their default values). What will happen when the hsbXpos.Scroll event is triggered by moving the scroll bar’s scroll box to the right?
a.         lblFace will move to the left
b.         lblFace will move up
c.         lblFace will move down
d.         lblFace will move to the right
11.       A form contains a horizontal scroll bar control named hsbXpos, and the code lblFace.Left = hsbXpos.Value is placed inside the hsbXpos.Scroll event procedure (where lblFace identifies a label on the form, and the hsbXpos’s Minimum and Maximum properties are set at their default values). What will happen when the hsbXpos.Scroll event is triggered by moving the scroll bar’s scroll box to the right?
a.         lblFace will move to the left
b.         lblFace will move up
c.         lblFace will move down
d.         lblFace will move to the right
12.       At times, you may need to create a selection structure that can choose from several alternatives.
a.         True
b.         False
13.       Using nested If…Then…Else statements is a much more convenient way of coding a multiple-alternative selection structure than using the If…ElseIf…Else statement.
a.         True
b.         False
14.       Variables declared with the Integer, Decimal, and Double data types can store numbers only.
a.         True
b.         False
15.       The value stored in the Text property is treated as alphanumeric text.
a.         True
b.         False
16.       As is true in most programming languages, string comparisons in Visual Basic® are not case sensitive.
a.         True
b.         False
17.       In Visual Basic®, the uppercase version of a letter is the same as its lowercase counterpart.
a.         True
b.         False
18.       Each character on the computer keyboard is stored in the computer’s internal memory using a different Unicode value.
a.         True
b.         False
19.       Unicode assigns a unique numeric value to each character used in the written languages of the world.
a.         True
b.         False
20.       The data type of the expressions in a Select Case statement does not need to be compatible with the data type of the selectorExpression.
a.         True
b.         False
21.       The If…Then…Else statement is the only statement you can use to code a multiple-path selection structure in Visual Basic®.
a.         True
b.         False