wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

A Review of Visual Basic

Total questions: 30

Worksheet time: 14mins

Name
Class
Date
1.

What is the first step in creating a new project in Visual Basic?

a)

Choose New Project… from the Start Page.

b)

Select Windows Forms Applications

c)

Type the project name

d)

Click Visual Basic in the New Project dialog box

2.

Where should you look at to know the files and resources in your VB project?

a)

Solution Explorer

b)

File Explorer

c)

Designer Window

d)

Code Designer

3.

How do you add a button on the Form?

a)

Drag and drop a button control from the Toolbox

b)

Click Format > Add Button

c)

Right-click and choose Insert Button

d)

Get it from the Solution Explorer window

4.

What does IntelliSense help you with in VB programming?

a)

It gives automatic code suggestions

b)

It changes the appearance of the Code Designer window.

c)

It debugs your program.

d)

It generates report from your code.

5.

Which is NOT an example of a property for a Label control?

a)

ButtonStyle

b)

Text

c)

ForeColor

d)

FontSize

6.

What are Events in VB Programming?

a)

They are responses like button click

b)

They define the layout of the UI.

c)

They define the design of the UI.

d)

They store data.

7.

How do you change the name of a Textbox on the Form?

a)

Look for the Name property in the Properties window and change it.

b)

Right-click and choose Rename

c)

Double-click and choose Rename

d)

Click Edit > Rename

8.

What are object properties in VB?

a)

They define the appearance and behavior of objects.

b)

They are keywords.

c)

They are used to create new objects.

d)

They perform operations in VB.

9.

What are methods in VBProgramming?

a)

They perform actions or execute code.

b)

They are used to declare variables.

c)

They define the layout of the program.

d)

They change the color of the Form.

10.

How is the program code written in VB?

a)

Type the code into the Code Editor.

b)

Use the TextBox object in the toolbox.

c)

Type the code in the UI Designer window.

d)

Code it in Notepad++ and copy into VB.

11.

Which code is correct?

a)

TextBox1.Text = “Type your name here.”

b)

TextBox1.Text = [“Type your name here.”]

c)

TextBox1.Text = (“Type your name here.”)

d)

TextBox1.Show = “Type your name here.”

12.

What is the correct syntax to enable Button1?

a)

Button1.Enabled = True

b)

Button1.Activate = True

c)

Button1.Enabled = "True"

d)

Button1{Enabled} = True

13.

What is the correct syntax to select RadioButton1?

a)

RadioButton1.Checked = True

b)

RadioButton1.Enabled = True

c)

RadioButton1.Select = True

d)

RadioButton1.Activate = True

14.

Which code will assign the text “Hello World!” to a Label?

a)

Label1.Text = “Hello World!”

b)

Label1.Value = “Hello World!”

c)

"Hello World! = Label1.Text

d)

"Hello World! = Text.Label1

15.

Which code will display the message “Warning! Item will be permanently deleted!” in a MessageBox?

a)

MessageBox.Show(“Warning! Item will be permanently deleted!”)

b)

MessageBox.Alert(“Warning! Item will be permanently deleted!”)

c)

MessageBox.Display(“Warning! Item will be permanently deleted!”)

d)

MessageBox.Write(“Warning! Item will be permanently deleted!”)

16.

Which code will hide a RadioButton?

a)

RadioButton1.Visible = False

b)

RadioButton1.Invisible = True

c)

RadioButton1.Show = False

d)

RadioButton1.Visible(False)

17.

Which code will set a ToolTip to a button with the message ‘Reload this page.’?

a)

SetToolTip(Button1, “Reload this page.”)

b)

Button1.ToolTip(“Reload this page.”)

c)

Button1.ToolTip = “Reload this page.”

d)

SetToolTip(Button1.Text, “Reload this page.”)

18.

Which code will disable Button1?

a)

Button1.Enabled = False

b)

Button1.Enabled = "False"

c)

Button1.Disabled = True

d)

Button1.Enabled(False)

19.

Which is the correct code to write a comment in VB?

a)

‘ This code converts °F to °C.

b)

/* This code converts °F to °C. */

c)

// This code converts °F to °C.

d)

#This code converts °F to °C.

20.

VB is used to develop programs for Windows-based PCs?

a)

True

b)

False

21.

GUI stands for Graphical User Interface?

a)

True

b)

False

22.

The period when a program is running is called Design time.

a)

False

b)

True

23.

Visual Basic programming is limited to desktop application development.

a)

False

b)

True

24.

Comments in VB are placed in the code using the asterisk symbol.

a)

False

b)

True

25.

The Form is referred to by the keyword “Mine.”

a)

False

b)

True

26.

The Visible property is used to hide or display a control.

a)

True

b)

False

27.

VB programming language is used to create business applications systems.

a)

True

b)

False

28.

Visual Basic is difficult to learn especially for beginners.

a)

False

b)

True

29.

BASIC stands for Beginners All-Purpose Symbolic Instruction Code.

a)

True

b)

False

30.

To prevent a user from clicking a button, set the ‘Enabled’ property of the button to ‘Disabled.’

a)

False

b)

True