How can we help?

You can also find more resources in our Help Center.

49 terms

Visual Basic

STUDY
PLAY
In a For...Next statement, if stepvalue is positive, then startvalue must be ____ endvalue for the loop instructions to be processed.
less than or equal to
You can use a ____ to display a list of choices from which the user can select zero choices, one choice, or more than one choice.
list box
If the stepvalue is omitted when coding a For...Next statement, at execution time the stepvalue is ____.
1
A Function procedure does not return a value after performing its assigned task.
False
The procedure footer for a Sub procedure is always 'End Procedure'
False
When the ByVal keyword is used on a Sub procedure's parameterlist the original data may be changed.
False
In Visual Basic, passing a variable's address is referred to as passing 'by reference'.
True
In Visual Basic, the Insert method is used to insert characters within a string.
True
In most cases, the last statement in a Function procedure is the ____ statement.
Return
In a ____ combo box, the text portion is editable, and the user must click the list arrow to view the list portion
DropDown
Like list boxes, combo boxes have a ____ property that you can use to arrange the items in the list in order.
Sorted
To get or set the value that appears in the text portion of the combo box, you use the ____ property.
Text
You invoke a function that you create in exactly the same way as you invoke a built-in function: you ____.
include the function's name in a statement or assignment statement
When passing arguments, if the programmer wants to preserve the original variable, the programmer should pass the variable by ____.
value
When passing arguments, if the programmer wants to grant access to the original variable, the programmer should pass the variable by ____.
reference
Each character in a string is assigned a unique number that indicates its position in the string; the number is called a(n) ____.
index
The following instruction will remove which character from the string first? Dim myString as string = 'ABCDEFGH' myString = myString.Remove(2, 3)
C
Assume that a text box named PhoneNumberTextBox appears on the form, and contains the phone number 414-555-5555. What value will display for the length of the phone number text box?
12
What is the value returned from the expression stateName.Substring(1,1) when stateName contains 'North Dakota'?
o
Assume that the value of the string message is 'Happy New Year'. What value would message.IndexOf('New') yield?
6
Each menu element is considered a(n) ____
object
The ____ property of a menu element is used by a programmer to refer to the menu element in code.
Name
What is the value of stringIn after executing the following code segment in Visual Basic? Dim stringIn as String = 'abc1234' Mid(stringIn, 3, 1) = 'd'
abcd234
You can use the ____ method to insert characters anywhere within a string.
Insert
You can ____ For Each...Next statements, which means that you can place one For Each...Next statement within another For Each...Next statement.
nest
Which of the following statements can be used to code a loop whose instructions you want to process 10 times?
Either Do...Loop or For...Next
Which of the following methods allows you to add items to a list box?
Add
The items in a list box belong to the ____ collection
Items
Which of the following properties stores the index of the item selected in a list box?
SelectedIndex
A function can return one or more values to the statement that invoked it.
False
The items listed in the Call statement are referred to as _____
arguments
Each memory location listed in the parameterList in the procedure header is referred to as ____
a parameter
To determine whether a variable is being passed to a procedure by value or by reference you examine
the procedure header
The name of each argument in the Call statement should be identical to the name of its corresponding parameter in the procedure header
False
THe memory locations listed in the parameterList in a procedure header have procedure scope and are removed from the computer's internal memory when a procedure ends
True
Which property is used to specify a combo box's style
DropDownStyle
The ________ Event occurs when the user either types a value in the text portion of a combo box or selects a different item in the list portion
TextChanged
A form's ____ event is triggered when you click the Close button on its title bar or process Me.Close
FormClosing
A horizontal line in a menu is called ____
a separator bar
You should assign shortcut keys to commonly used menu titles
False
Which of the following statements sorts the intQualities array in ascending order?
Array.Sort(intQuantities)
If the elements in two arrays are related by their subscripts, the arrays are called ________ arrays.
parallel
Which statement is used to create a user-defined data type?
Structure
In most applications, the code to define a user-defined data type is entered into the form's ________
Declarations Section
If the file to be opened exists, the _______ method erases the files contents
CreateText
The AppendText method creates a ________ object.
SequenceReader
WHich object connects a database to a DataSet
TableAdapter
The ____ property stores an integer that represents the location of the record pointer in a dataset.
BindingSource object's Position
Which object provides the connection between a DataSet object and a control on a form?
BindingSource