

Visual Basic Programming
Final Test Solutions
Course Introduction
Visual Basic Programming introduces students to the fundamentals of programming using the Visual Basic language and development environment. The course covers essential programming concepts such as variables, data types, control structures, procedures, arrays, and error handling while emphasizing object-oriented design principles. Students will develop practical skills by designing and building user-friendly Windows applications that incorporate graphical user interfaces, event-driven programming, database connectivity, and file operations. Through hands-on projects and exercises, learners gain proficiency in problem-solving and application development using Visual Basic, preparing them to leverage these skills in real-world scenarios or further study in software development.
Recommended Textbook
Programming in Visual Basic 2010 1st Edition by Julia Case Bradley
Available Study Resources on Quizplus 14 Chapters
795 Verified Questions
795 Flashcards
Source URL: https://quizplus.com/study-set/2524

Page 2

Chapter 1: Introduction to Visual Basic 2010
Available Study Resources on Quizplus for this Chatper
54 Verified Questions
54 Flashcards
Source URL: https://quizplus.com/quiz/50145
Sample Questions
Q1) The Solution Explorer window is used to design a form that makes up your user interface.
A)True
B)False
Answer: False
Q2) After the steps for planning a Visual Basic project are competed,you can begin actually constructing a program by _______.
A)Setting the properties
B)Creating the interface
C)Writing the code
D)Executing the next step based on the programmer's preference Answer: B
Q3) You can use the Properties window to change the properties of controls during run time.
A)True
B)False
Answer: False
To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: User Interface Design
Available Study Resources on Quizplus for this Chatper
74 Verified Questions
74 Flashcards
Source URL: https://quizplus.com/quiz/50144
Sample Questions
Q1) If you want to display text that cannot be modified by the user,use the _______.
A)TextBox control
B)Label control
C)Caption control
D)MaskedTextBox control
Answer: B
Q2) Which of the following statements will clear the contents of a text box named MessageTextBox?
A)MessageTextBox.Text = ""
B)MessageTextBox.Clear()
C)MessageTextBox.Text = String.Empty
D)All of the answers are correct.
Answer: D
Q3) The default setting for the Checked property of a check box is True.
A)True
B)False Answer: False
To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: Variables, Constants, and Calculations
Available Study Resources on Quizplus for this Chatper
58 Verified Questions
58 Flashcards
Source URL: https://quizplus.com/quiz/50143
Sample Questions
Q1) Which of the following is NOT a valid Visual Basic data type?
A)Integer
B)Real
C)Decimal
D)String
Answer: B
Q2) If a procedure contains a Dim statement and NameString is assigned as the identifier,NameString can be used _______.
A)anywhere in the project
B)only in the procedure where the Dim statement is shown
C)anywhere in the project if the variable name is changed to NAME_String
D)only once in the procedure
Answer: B
Q3) Which of the following is NOT a valid rule for naming identifiers?
A)Names may contain underscores.
B)Names may contain letters.
C)Names may contain digits.
D)Names may contain spaces.
Answer: D
To view all questions and flashcards with answers, click on the resource link above.
Page 5

Chapter 4: Decisions and Conditions
Available Study Resources on Quizplus for this Chatper
51 Verified Questions
51 Flashcards
Source URL: https://quizplus.com/quiz/50142
Sample Questions
Q1) A block of If / Then / Else must begin with an If statement and end with an EndOfIf statement.
A)True
B)False
Q2) Use the Visual Studio intrinsic constant,_______,to determine line endings.
A)VB.Multiline
B)Environment.NewLine
C)VS.NewLine
D)VB.NewLine
Q3) Use the Case structure and convert the following If statement so that it checks the string as an uppercase value.
If StateNameString = "California" Then
AdjustedPriceDecimal = PriceDecimal+(PriceDecimal * TaxDecimal) Else
AdjustedPriceDecimal = PriceDecimal End If
Q4) Or and And are logical operators used in compound expressions.
A)True
B)False
Q5) What are the six comparison operators? Give an example using each one.
Page 6
To view all questions and flashcards with answers, click on the resource link above.

Chapter 5: Menus, Common Dialog Boxes, Sub Procedures, and
Function
Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/50141
Sample Questions
Q1) When creating a menu,if an item named "Help" is listed,it should be at the far right and the H should have keyboard access.
A)True
B)False
Q2) Which of the following is not a type of common dialog box?
A)Color
B)Save
C)Edit
D)Open
Q3) Explain the differences between ByVal and ByRef when passing arguments.B.ByRef sends a reference indicating where the value is stored in memory,allowing the called procedure to actually change the argument's original value.
Q4) Which of the following statements about context menus is NOT true?
A)A program can have more than one context menu.
B)You can assign the same context menu to more than one control on the form.
C)A context menu can be assigned to a control by setting the control's ContextMenuStrip property.
D)The user can access a context menu on a button by right-clicking on the form.
Page 7
To view all questions and flashcards with answers, click on the resource link above.
Chapter 6: Multiform Projects
Available Study Resources on Quizplus for this Chatper
69 Verified Questions
69 Flashcards
Source URL: https://quizplus.com/quiz/50140
Sample Questions
Q1) You can remove a form from a project by _______.
A)selecting the form's name in the Solution Explorer window and clicking the delete key
B)writing code in a button on the form that uses the form name and the Close method
C)right-clicking on the form's name in the Solution Explorer window and choosing Delete
D)Both answers A and C would remove a form from a project
Q2) When copying form files from another project,only copy the file with the .vb file extension and VB will automatically copy the form files with the Designer.vb extension and the .resx extension.
A)True
B)False
Q3) To add a form from another project into your project,select _______ from the "Project" menu.
A)Add Windows Form
B)Add Existing Item
C)Add New Item
D)All of these could be used to add an existing form to your project.
Q4) Write the statement that will display a form named,SummaryForm,as modal.
To view all questions and flashcards with answers, click on the resource link above.

8

Chapter 7: Lists, loops, and Printing
Available Study Resources on Quizplus for this Chatper
76 Verified Questions
76 Flashcards
Source URL: https://quizplus.com/quiz/50139
Sample Questions
Q1) What is the value of the SelectedIndex property if the user has not selected an item from a combo box?
A)-1
B)0
C)1
D)None of these
Q2) The Alphabetize property can be set to True and the combo or list box will automatically be sorted when an item is added to the list.
A)True
B)False
Q3) How many times will the statements inside this For/Next loop be executed? For IndexInteger = 1 to 10 'Statements in loop
Next IndexInteger
A)2
B)4
C)5
D)10
To view all questions and flashcards with answers, click on the resource link above.
9

Chapter 8: Arrays and Collections
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/50138
Sample Questions
Q1) How many elements are contained in the array created with the following code? Dim EmployeeString(25)As String
A)0 (The code is incorrect to create an array. )
B)24
C)25
D)26
Q2) Code to create a user-defined Structure should be placed inside the procedure in which the structure will be used.
A)True
B)False
Q3) Write a declaration statement for a SortedList object named MyList,accessible to all classes in the project.
Q4) A Structure declaration cannot go inside a procedure.
A)True
B)False
Q5) A subscript may also be called an index.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Web Applications
Available Study Resources on Quizplus for this Chatper
66 Verified Questions
66 Flashcards
Source URL: https://quizplus.com/quiz/50137
Sample Questions
Q1) When you place an object on a Web Form using absolute positioning,you cannot move the object.
A)True B)False
Q2) AJAX is a feature that can only be used for Web pages which will run in Internet Explorer.
A)True B)False
Q3) HTML Web pages are _______.
A)dynamic
B)stateless
C)servers
D)browsers
Q4) Web projects created using File System Web sites or Web Projects can be moved from one computer to another and will run without modifications.
A)True B)False
Q5) What are the functions of the server and client in a Web application?
To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Database Applications
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/50136
Sample Questions
Q1) Which one of the following is NOT a component that appears in the component tray after a DataGridView control has been connected to a data source?
A)DataSet
B)BindingSource
C)TableAdapter
D)DataNavigator
Q2) Using _______ as the data provider,you can obtain data from sources such as Access,Oracle,Sybase,or DB2.
A)OleDb
B)SQLClient for SQL Server
C)ODBC
D)Oracle
Q3) The _______ method is used to populate the data set.
A)Load
B)Data
C)Fill
D)DataSet
Q4) Describe each of the following objects: BindingSource,TableAdapter,and Dataset.
To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Data Files
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/50135
Sample Questions
Q1) The data files that are presented in Chapter 11,Saving Data in Files,are commonly used to store large amounts of data.
A)True
B)False
Q2) Setting the BooleanAppend argument to True in the StreamWriter constructor
A)will create a new data file
B)is used to add data to the end of existing data files
C)adds data to the beginning of an existing data file
D)reads data previously stored on disk
Q3) The _______ method of My.Computer.FileSystem is used to read an entire file into a single string.
A)WriteAllText
B)ReadAllText
C)ReadLine
D)WriteLine
Q4) The StreamReader is used to create a data file.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: OOP: Creating Object-Oriented Programs
Available Study Resources on Quizplus for this Chatper
51 Verified Questions
51 Flashcards
Source URL: https://quizplus.com/quiz/50134
Sample Questions
Q1) The quickest and most reliable way to look up the names of objects,properties,methods,events,and constants for Visual Basic objects is by using the
A)toolbox
B)Class module
C)Object Browser
D)enumerator
Q2) The value of a property in a class module can be retrieved through the Get accessor method in the Property procedure.
A)True
B)False
Q3) You can create a new class based on one of the existing VB classes or from one of your own classes.
A)True
B)False
Q4) When you create a method with the same name and the same argument list as a method in the base class,the new method is said to override the base-class method.
A)True B)False
To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: Graphics, Animation, Sound, and
Drag-And-Drop
Available Study Resources on Quizplus for this Chatper
62 Verified Questions
62 Flashcards
Source URL: https://quizplus.com/quiz/50133
Sample Questions
Q1) Using a control's SetBounds method produces a smoother-appearing animation than the animation that is produced by changing the Left and Top properties of a control.
A)True
B)False
Q2) To make sure that the graphics on the form get redrawn every time the form is rendered,place the code in the form's _______ procedure.
A)Load
B)Activate
C)Redraw
D)Paint
Q3) The _______ event fires when the user drags a source object over the target.
A)DragDrop
B)DragEnter
C)MouseEnter
D)DoDragDrop
Q4) The source object is the item you wish to drag.
A)True
B)False
Q5) Explain the use of the X and Y coordinates in the drawing methods.
To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Additional Topics in Visual Basic
Available Study Resources on Quizplus for this Chatper
60 Verified Questions
60 Flashcards
Source URL: https://quizplus.com/quiz/50132
Sample Questions
Q1) WPF controls can only be added to Web Forms,not Windows Forms.
A)True
B)False
Q2) The _______ can make your form resemble a browser window in Internet Explorer.
A)Web control
B)Browser control
C)Internet control
D)WebBrowser control
Q3) MDI is an acronym that stands for _______.
A)Multiple Device Interface
B)Multiple Document Interface
C)Many Document Interlink
D)Match Document Interlink
Q4) When you add a status bar to a form,the StatusStrip control will display two labels,one for date and one for time.
A)True
B)False
Q5) MDI is an acronym for musical device interface.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 16