Visual Basic Programming Exam Practice Tests - 795 Verified Questions

Page 1


Visual Basic Programming Exam Practice

Tests

Course Introduction

Visual Basic Programming introduces students to the fundamental concepts and practical applications of programming using Visual Basic, a versatile and user-friendly programming language developed by Microsoft. The course covers essential topics such as problem-solving techniques, user interface design, event-driven programming, control structures, data types, and error handling. Students will learn how to create interactive Windows-based applications, manipulate data through forms and controls, and incorporate basic file handling. Through hands-on projects and examples, this course equips learners with the skills needed to develop robust and efficient software solutions using Visual Basic, preparing them for further study or careers in software development and information technology.

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 property used to display information in the title bar of a form is _______.

A)TitleBar

B)Name

C)Text

D)Title Answer: C

Q2) The _______ holds information about the solution and the projects it contains.This is the file that you open to work on or run your project.

A)project file

B)resource file

C)solution file

D)vb file

Answer: C

Q3) Assignment statements work from left to right,assigning the value on the left side of the equal sign to the property named on the right side of the equal sign.

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) TextBoxes can only display a single line of text,but RichTextBoxes can display text on multiple lines.

A)True

B)False

Answer: False

Q2) 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

Q3) The code: NameTextBox.ForeColor = Color.Red,will _______.

A)change the color of the border of the NameTextBox control to red

B)cause the NameTextBox control to have a red background

C)change the background color of the form to red

D)change the text in the NameTextBox control to the color,red

Answer: D

To view all questions and flashcards with answers, click on the resource link above.

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) When using the format specifier codes,you can specify the number of digits to appear to the right of the decimal point.

A)True

B)False

Answer: True

Q2) Write code using nested Try/Catch blocks where you will store data from text boxes named QuantityTextBox and PriceTextBox into variables named QuantityInteger and PriceDecimal.Handle any exceptions by displaying a message in a message box if the text boxes do not contain valid data.

Answer: Try

QuantityInteger = Integer.Parse(QuantityTextBox.Text)

Try

PriceDecimal = Decimal.Parse(PriceTextBox.Text)

Catch PriceException as FormatException MessageBox.Show("Invalid price")

End Try

Catch quantityException as FormatException MessageBox.Show("Invalid quantity")

End Try

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) "If RedRadioButton.Checked Then" is valid code for checking if a radio button is selected.

A)True

B)False

Q2) The AND operator requires that both conditions be True for the compound expression to be True.

A)True

B)False

Q3) Nested Ifs are allowed,_______.

A)But you are limited to only 4 levels of Ifs

B)But each If must have an End If

C)Can be difficult to follow if they are nested too deeply

D)Both answers b and c are correct.

Q4) The code: If NumberAInteger > NumberBInteger OR NumberBInteger > NumberCInteger Then,evaluates True when NumberAInteger = 3,NumberBInteger = 5,and NumberCInteger = 2.

A)True

B)False

Q5) What are the six comparison operators? Give an example using each one.

To view all questions and flashcards with answers, click on the resource link above. Page 6

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) Which of the following statements about menus is NOT true?

A)Menu items are displayed in buttons at the top of the window.

B)Create a menu by adding a MenuStrip component to the form.

C)In a menu,submenus will be indicated by a filled triangle to the right of the command.

D)Each item in a menu can have keyboard access.

Q2) Of the following choices,which CANNOT be done with common dialog boxes?

A)Opening files

B)Selecting fonts

C)Selecting colors

D)Resizing windows

Q3) 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

Q4) You must declare the name of a function as a module-level variable if you want it to return values.

A)True

B)False

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) Give an example of when you might want to hide a form instead of closing it.Explain why hiding would be better than closing the form.

Q2) If a variable is declared with a Dim statement in a sub procedure,all other forms in the project will have access to that variable.

A)True

B)False

Q3) No other program code can execute until the modal form has been responded to and hidden or closed.

A)True

B)False

Q4) In a project with multiple forms,the _____________ form is the first form loaded into the computer's memory and displayed on the desktop.

A)default

B)startup

C)about

D)splash screen

Q5) Write the statement to declare a constant that can be used in multiple forms and that will hold the ABC company name.

To view all questions and flashcards with answers, click on the resource link above. Page 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) The group of repeated instructions in a Do/Loop is called a(n)__________.

A)group

B)set

C)loop body

D)iteration

Q2) A _______ control contains a text box as part of the control.

A)Frame

B)ListBox

C)ComboBox

D)DropDownList

Q3) The Continue statement can be used to skip to the next iteration of a loop.

A)True

B)False

Q4) What is the value of the SelectedIndex property if the user has selected the last item in a list with four items?

A)3

B)4

C)5

D)0

To view all questions and flashcards with answers, click on the resource link above. Page 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) after the following declaration is initialized? Dim NameString ( ,)As String = { "James","Mary"},{ "Sammie","Sean"}

A)James

B)Mary

C)Sammie

D)Sean

Q2) When you are working with an array,the easiest way to traverse the elements is to use the _______.

A)If / Then statement

B)Next statement

C)For Each / Next statement

D)Case structure

Q3) Code to create a user-defined Structure should be placed inside the procedure in which the structure will be used.

A)True

B)False

Q4) A table lookup can be used to look up array elements indirectly.

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 are creating a Web Project,you click on the _______ in order to view the HTML code.

A)Source tab

B)Solution Explorer

C)Default page

D)Design tab

Q2) _______ is the acronym for the popular tag-based notation used to define data and its format,and transmit the data over the Web.

A)XML

B)SOAP

C)HTML

D)WSDL

Q3) When you place an object on a Web Form using absolute positioning,you cannot move the object.

A)True

B)False

Q4) FTP sites cannot be used to create a new Web site.

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) Describe each of the following objects: BindingSource,TableAdapter,and Dataset.

Q2) A library keeps track of all of the books in a database table.Author,Title,and Subject are _______ in the database table.

A)files

B)records

C)fields

D)keys

Q3) If you select a database on a local disk drive when you select "Local Database File",the Data Source Configuration Wizard,if you so request,will create a copy of the database file in the project's folder.

A)True

B)False

Q4) Which of the following controls CANNOT be data bound?

A)label

B)check box

C)combo box

D)All of the controls above can be data bound

To view all questions and flashcards with answers, click on the resource link above.

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 standard Windows OpenFileDialog component can be used in your VB program to allow users to browse for a folder and filename.

A)True

B)False

Q2) You can use _______ in order to allow the user to browse and find a file at run time.

A)the OpenFileDialog common dialog control

B)the StreamReader object

C)the OpenDialog control

D)a hard-coded path name

Q3) In the statement,PhoneStreamWriter.WriteLine(NameTextBox.Text),NameTextBox.Text refers to _______.

A)the record number

B)the variable that will store the data in NameTextBox

C)the data file number

D)the Text property of the object that contains the data that will be written to disk

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.

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) When you add a class module to a project,any form in the same project will automatically recognize the class properties,methods,and events.

A)True

B)False

Q2) The acronym OOP stands for Object-Oriented Procedures.

A)True

B)False

Q3) Get and Set accessor methods must be _______ in order to allow other modules (forms or classes)to assign and retrieve their values.

A)Functions

B)Strings

C)Public

D)Private

Q4) Forms are inherited from System.Windows.Forms.Form class.

A)True

B)False

Q5) Inheritance is the ability to create a new class from an existing class. 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) A graphic is being placed on a button control on the form.Which object's starting point is used for the graphic?

A)The form

B)The button

C)A GroupBox

D)A PictureBox

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) Use the Pen object to draw lines on a form.

A)True

B)False

Q4) The ScrollBar_Click event occurs when the user clicks the up arrow of a vertical scroll bar.

A)True

B)False

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) 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

Q2) Which of the following actions can the parent's Window menu perform?

A)List the open child windows

B)Allow the user to switch between windows

C)Arrange multiple child windows

D)All of these

Q3) Which of the following objects can be used for loading and displaying the data from an XML file?

A)XDocument

B)XDisplay

C)XMLDocument

D)XMLDisplay

Q4) Arranging the layout of child windows is controlled by writing code in a Window Menu on the parent form.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 16

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Visual Basic Programming Exam Practice Tests - 795 Verified Questions by Quizplus - Issuu