WorksheetsA Review of Visual Basic
Total questions: 30
Worksheet time: 14mins
What is the first step in creating a new project in Visual Basic?
Choose New Project… from the Start Page.
Select Windows Forms Applications
Type the project name
Click Visual Basic in the New Project dialog box
Where should you look at to know the files and resources in your VB project?
Solution Explorer
File Explorer
Designer Window
Code Designer
How do you add a button on the Form?
Drag and drop a button control from the Toolbox
Click Format > Add Button
Right-click and choose Insert Button
Get it from the Solution Explorer window
What does IntelliSense help you with in VB programming?
It gives automatic code suggestions
It changes the appearance of the Code Designer window.
It debugs your program.
It generates report from your code.
Which is NOT an example of a property for a Label control?
ButtonStyle
Text
ForeColor
FontSize
What are Events in VB Programming?
They are responses like button click
They define the layout of the UI.
They define the design of the UI.
They store data.
How do you change the name of a Textbox on the Form?
Look for the Name property in the Properties window and change it.
Right-click and choose Rename
Double-click and choose Rename
Click Edit > Rename
What are object properties in VB?
They define the appearance and behavior of objects.
They are keywords.
They are used to create new objects.
They perform operations in VB.
What are methods in VBProgramming?
They perform actions or execute code.
They are used to declare variables.
They define the layout of the program.
They change the color of the Form.
How is the program code written in VB?
Type the code into the Code Editor.
Use the TextBox object in the toolbox.
Type the code in the UI Designer window.
Code it in Notepad++ and copy into VB.
Which code is correct?
TextBox1.Text = “Type your name here.”
TextBox1.Text = [“Type your name here.”]
TextBox1.Text = (“Type your name here.”)
TextBox1.Show = “Type your name here.”
What is the correct syntax to enable Button1?
Button1.Enabled = True
Button1.Activate = True
Button1.Enabled = "True"
Button1{Enabled} = True
What is the correct syntax to select RadioButton1?
RadioButton1.Checked = True
RadioButton1.Enabled = True
RadioButton1.Select = True
RadioButton1.Activate = True
Which code will assign the text “Hello World!” to a Label?
Label1.Text = “Hello World!”
Label1.Value = “Hello World!”
"Hello World! = Label1.Text
"Hello World! = Text.Label1
Which code will display the message “Warning! Item will be permanently deleted!” in a MessageBox?
MessageBox.Show(“Warning! Item will be permanently deleted!”)
MessageBox.Alert(“Warning! Item will be permanently deleted!”)
MessageBox.Display(“Warning! Item will be permanently deleted!”)
MessageBox.Write(“Warning! Item will be permanently deleted!”)
Which code will hide a RadioButton?
RadioButton1.Visible = False
RadioButton1.Invisible = True
RadioButton1.Show = False
RadioButton1.Visible(False)
Which code will set a ToolTip to a button with the message ‘Reload this page.’?
SetToolTip(Button1, “Reload this page.”)
Button1.ToolTip(“Reload this page.”)
Button1.ToolTip = “Reload this page.”
SetToolTip(Button1.Text, “Reload this page.”)
Which code will disable Button1?
Button1.Enabled = False
Button1.Enabled = "False"
Button1.Disabled = True
Button1.Enabled(False)
Which is the correct code to write a comment in VB?
‘ This code converts °F to °C.
/* This code converts °F to °C. */
// This code converts °F to °C.
#This code converts °F to °C.
VB is used to develop programs for Windows-based PCs?
True
False
GUI stands for Graphical User Interface?
True
False
The period when a program is running is called Design time.
False
True
Visual Basic programming is limited to desktop application development.
False
True
Comments in VB are placed in the code using the asterisk symbol.
False
True
The Form is referred to by the keyword “Mine.”
False
True
The Visible property is used to hide or display a control.
True
False
VB programming language is used to create business applications systems.
True
False
Visual Basic is difficult to learn especially for beginners.
False
True
BASIC stands for Beginners All-Purpose Symbolic Instruction Code.
True
False
To prevent a user from clicking a button, set the ‘Enabled’ property of the button to ‘Disabled.’
False
True
