TekHigh-Visual Basic - Net (2021!12!24 13-09-30 UTC)
TekHigh-Visual Basic - Net (2021!12!24 13-09-30 UTC)
NET
Lesson 1:
Introduction to
Computer
Programming
Objectives:
By the end of this courseware, the student
is expected to:
Toolbox
Windows
Form
Designer
Data Properties
Sources Window
Window
Error List
Window
Save Icon
Save Project Dialog Box
Checking if the project is saved
properly
1. Go to File > Close Project, which
will clear the VB work area.
2. Then go to File > Open Project. A
file browser window will pop up
and ask you to select the folder of
the project.
Checking if the project is saved
properly
1. Choose the project file as the
Object Name and then click on the
Open button.
2. If the project was saved
successfully, the VB.NET IDE will
load the project you were working
on in the exact way that you had
left it.
Forms and Controls
Not(True) False
Label1
Label 2
Textbox1
button1
Output
If-Then else Statement
Syntax:
If Condition then
Vb statement1
Else
vb statement2
End if
Example: Determine if the number
is odd or even using if else
Combo1
Button1
OUTPUT
Lesson 5:
Loops & Arrays
Objectives:
In this lesson, the students will be able to:
Form1
Label1
Textbox1
Listbox1
Button1
Global Variables
• These are declared in the general
declarations part of the code. They are
outside any subroutine or functions but
still within the class.
• These variables have a Public access
modifier which means that they can be
used by all elements in the project.
Lesson 6:
Organizing Your
Program using
Procedures
Objectives:
In this lesson, the students will be able to:
Font Size: 14 9 11
Font Style Bold: True False True
Font Style Italic False True True
The button’s methods are a series of
subroutines and functions within the
button class.
Label 1
Button 1
Multiple Forms
Form 2
Label1
Label2
Button 1
Dialog Box
A dialog box is also
known as a modal form.
Unlike in modeless forms,
the user can no longer
interact with Form 1
unless it interacts with
Form 2 first, once a
modal form is called.
These forms are also
known as being able to
return a value back to the
form that called it.
Menu
Menus allow you to group commands in
your application by a common theme.
It also makes the user interface of your
application organized.
You can also provide access keys and
shortcut keys to make menu navigation
easier for the repeat users of your
application.
CREATING MENU
Choose MenuStrip on the toolbox as
shown below.
SETTING PROPERTIES
CONTROL PROPERTY SETTING
FORM1
FORM2
BUTTON1
FORM3
BUTTON1
FORM4
BUTON1
FORM5
BUTTON1
FORM6
BUTTON1
Writing the Codes
Private Sub
LESSON1ToolStripMenuItem_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
LESSON1ToolStripMenuItem.Click
Form2.Show()
Me.Hide()
End Sub
Writing the Codes
Private Sub
EXITToolStripMenuItem_Click(ByVal sender
As System.Object, ByVal e As
System.EventArgs) Handles
EXITToolStripMenuItem.Click
End
End Sub
OUTPUT
Lesson 9:
Accessing Data
Objectives:
In this lesson, the students will be able to: