SlideShare a Scribd company logo
1 of 56
Download to read offline
INTRODUCTION
Programming in general is
the process of making
instructions for a
computer to follow.
VB.NET
Visual Basic .NET (VB.NET) is
an object-oriented computer
programming language
implemented on the .NET
Framework. Although it is an
evolution of classic Visual
Basic language, it is not
backwards-compatible with
VB6, and any code written in
the old version does not
compile under VB.NET.
IDE
IDE stands for Integrated
Development Environment.
These are tools that are used
for programming using a
certain programming language.
Each programming languages
have their own IDE and
feature that will help in
compiling and checking of
errors in your code.
IDE
The .Net framework is a
revolutionary platform
that helps you to write
the following types of
applications:
• Windows applications
• Web applications
• Web services
IDE
Microsoft provides the
following development
tools for VB.NET
programming:
• Visual Studio 2010 (VS)
• Visual Basic 2010 Express
(VBE)
• Visual Web Developer
PARTS OF THE VB.NET IDE
PARTS OF THE VB.NET IDE
PARTS OF THE VB.NET IDE
PARTS OF THE VB.NET IDE
PARTS OF THE VB.NET IDE
The Toolbox is the
part where every
control that can
be used in your
program is
located. Most of
the things that
are inside the
toolbox are
arranged
alphabetically and
you can also
arrange it in a
way that you like.
PARTS OF THE VB.NET IDE
• The Solution
Explorer is the
part that shows
every file in
your project
you can see all
the files shown
here if you
look on the
directory of
the project.
PARTS OF THE VB.NET IDE
The Properties
is the part
that shows
every property
of the control
and events that
can be used
with it (more
on this on the
next topic).
PARTS OF THE VB.NET IDE
The [Design]
Window is where
you can see
what your form
looks like and
you can arrange
the control in
it accordingly.
PARTS OF THE VB.NET IDE
Double Clicking
a control on
the design
window will
show a sub for
the control in
the code-behind
file of the
form.
PARTS OF THE VB.NET IDE
• Each form in your solution have
a code-behind file where you
can put the command that’s
going to be associated for the
control.
PARTS OF THE VB.NET IDE
•In case you
accidentally
closed one of
the windows. You
can open it
again by
clicking the
“View” tab on
the Menu strip
on the top of
the window.
CONTROLS
The items in the toolbox are
the controls. Each control
are tools that can be placed
in the form to perform
various tasks. Here are some
of the controls that you can
use in your program. In order
to put one on your form, you
can click and drag the
control from the toolbox or
click then resize the control
CONTROLS
• The use of a button is to
run the code that is
assigned when the button
click event happened.
• The textbox is one of
the ways that your
program can accept
user input.
CONTROLS
• The use of a button is to
run the code that is
assigned when the button
click event happened.
• The textbox is one of
the ways that your
program can accept
user input.
CONTROLS
• The picturebox is
the control that is
used to place
images on your
forms.
• The use of label is to
put text on your form. It
is generally used to
display some informative
text on the GUI which is
not changed during
runtime.
CONTROLS
• The picturebox is
the control that is
used to place
images on your
forms.
• The use of label is to
put text on your form. It
is generally used to
display some informative
text on the GUI which is
not changed during
runtime.
CONTROLS
• Checkbox are used for
multiple selections. An
example of using it is on
questions like “What
three items in a list do
you like most on this
list of items?”
• Radiobutton are the
counterpart of checkbox
but in a group of
radiobuttons, only one
of the will always be
selected.
CONTROLS
• Checkbox are used for
multiple selections. An
example of using it is on
questions like “What
three items in a list do
you like most on this
list of items?”
• Radiobutton are the
counterpart of checkbox
but in a group of
radiobuttons, only one
of the will always be
selected.
CONTROLS
• ComboBox are like textbox
but will accept multiple
text using their “Item”
property and have a
dropdown button to show
all its contents.
• Listbox are similar
to combobox with
their difference is
that the items are
shown.
CONTROLS
• ComboBox are like textbox
but will accept multiple
text using their “Item”
property and have a
dropdown button to show
all its contents.
• Listbox are similar
to combobox with
their difference is
that the items are
shown.
CONTROLS
• MenuStrip are the list of
intractable buttons that are
permanently located of the top
part of the form. A pop up
version of it is the
“ContextMenuStrip”.
PROPERTIES
• Each control
has properties
that govern how
one can
interact with
it and what it
can react to.
Also properties
define how the
control will
look like.
PROPERTIES
• Most controls have
the same properties
and if more than
one control is
selected, all the
properties that the
selected controls
shared will be the
only ones that are
shown. In order to
view the properties
of a control, click
one and it will
show its properties
in the property
window like these.
PROPERTIES
The icons below on the top of the
properties window have different
effects.
• The first 2 are for sorting the
properties by uses or alphabetically.
• The next 2 are for the properties and
events associated with the control.
• The last one is used to show the
property page of the whole project.
PROPERTIES
Now here are some of the commonly
used properties and their uses:
• (Name) – The use of this
property is to give the control
a name that is used to call the
control on the code. You can
use alphanumeric characters in
the name of your control but
try to name your control with
something that will remind you
of what that control do.
PROPERTIES
• Text – This property contains
the text that will be shown
by the control. It is used to
get or set the text of the
associated control.
• ForeColor, BackColor – This
property change the color of
the text and the background
color of the control
respectively.
PROPERTIES
• Enabled - Gets or sets a
value indicating whether
the control can respond to
user interaction.
• Visible - Gets or sets a
value indicating whether
the control and all its
child controls are
displayed.
PROPERTIES
• Location – Gets or sets the
location of the control
from the reference point
which is the upper-left
corner of the form.
• Size - Gets or sets the
height and width of the
control.
PROPERTIES
In order to use the property of
the control, you must first call
the (Name) property of the
control then call the respective
property that you are using or
changing.
EVENTS
The other tab
of the
Properties
window is the
Events Window.
EVENTS
When you double
click a control
on the [Design],
the default
Event will be
selected.
You can choose
which event to
use by going to
the events
window and
selecting
EVENTS
Here are some of the
events that you can find
in the Events window:
• Click– This event happens
when the control is
clicked.
EVENTS
• MouseEnter – This occurs
if the mouse pointer
enters the visible part
of the control.
• TextChanged – Occurs when
the text property of the
control is changed.
EVENTS
• KeyPress– Occurs when the
control receive keyboard
input the the key is
released.
• Enter– Occurs when the
control becomes the
active control of the
form.
HELLO WORLD
Open the “Microsoft Visual Basic 2010
Express”, create a new project, set it to
“Windows Form Application” and name it
“HelloWorld”. Click ok.
HELLO WORLD
Save the project on the specified folder
given by the trainer.
HELLO WORLD
On the toolbox, select the “Button” and
place in the form as shown in the
screenshot below.
HELLO WORLD
Double-click the button control and the
code behind file will show up. After that,
type the following code on the area as
shown in the image:
MsgBox(“Hello World!”)
HELLO WORLD
Run the program by pressing the “F5” key
and click the button. The result must look
like in the picture below.
NAMING CONVENTIONS
Control type pref
ix
Example
Form frm frmEntry
Label lbl lblHelpMessage
Text box txt txtLastName
Button btn btnConfirm
List box lst lstPolicyCodes
Combo box, drop-
down list box
cbo cboEnglish
Picture box pic picVGA
Check box chk chkReadOnly
Radio Button opt optEnabled
Timer tmr tmrAlarm
• Naming
Conventions
are optional,
they serve as
guidelines in
order to
easily
understand
your code.
LAYOUT
• As you’ve tried to
make your own
program, you have
designed it and
possibly have
trouble designing
your form. A Tool
that can help you
is the Layout
Toolbar.
• You can access it
by right-clicking
the menu bar and
selecting “Layout”.
LAYOUT
• After selecting the Layout
toolbar, the toolbar will show
up. We will go through the uses
of it that is mostly used.
LAYOUT
• The items above are used
for alignment of
different controls. To
the left, right, middle,
top, center and bottom.
Just remember that the
alignment that is
followed comes from the
selected control with a
white box in the corner
as seen on the image to
the right.
LAYOUT
• On the image, a
Label, TextBox and a
Button are selected.
The Textbox have the
white box on its
border which means
that the alignment or
any Layout selection
done will from the
location of the
TextBox.
LAYOUT
• This is used for changing
the size of the selected
controls to follow the size
of the selected control
with a white box if the
other controls can change
size.
LAYOUT
• The items above are used
for the spacing of each
control either horizontal
or vertical.
LAYOUT
• The items above are used
for the alignment to the
center or middle with
respect to the form itself.
LAYOUT
• The items above are used
for overlapping controls to
put one control above or
below another.
LAYOUT
• The item above is “Tab
Order”. It is used for any
interact able controls so
that when you press tab
stop, you can choose which
control will get focused
next.
LAYOUT
• On the picture to the left, if
you click “Tab Order”, it will
show you the order of which
control will receive the focus
next.
LAYOUT
• You can click the numbers to
change which control will be
selected next. Click the “Tab
Order” button again to finalize
the changes.

More Related Content

Similar to Visual Basic IDE Intro.pdf

Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic conceptsmelody77776
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfCristina Vidu
 
5 free tools for web accessibility testing
5 free tools for web accessibility testing5 free tools for web accessibility testing
5 free tools for web accessibility testingJohn McNabb
 
Getting started with the visual basic editor
Getting started with the visual basic editorGetting started with the visual basic editor
Getting started with the visual basic editorputiadetiara
 
Word 2007 intro
Word 2007 introWord 2007 intro
Word 2007 introedshee
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0DivyaR219113
 
Introduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET ControlsIntroduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET ControlsKhademulBasher
 
Programming basics
Programming basicsProgramming basics
Programming basicsSenri DLN
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxAnasYunusa
 
Buttons In .net Visual Basic
Buttons In .net Visual BasicButtons In .net Visual Basic
Buttons In .net Visual Basicmanish maurya
 
2 working with operating system
2 working with operating system2 working with operating system
2 working with operating systemMukesh Thakur
 
visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginnerSalim M
 

Similar to Visual Basic IDE Intro.pdf (20)

Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic concepts
 
IS100 Week 3
IS100 Week 3IS100 Week 3
IS100 Week 3
 
Introduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdfIntroduction to UiAutomation EMEA APAC.pdf
Introduction to UiAutomation EMEA APAC.pdf
 
5 free tools for web accessibility testing
5 free tools for web accessibility testing5 free tools for web accessibility testing
5 free tools for web accessibility testing
 
Getting started with the visual basic editor
Getting started with the visual basic editorGetting started with the visual basic editor
Getting started with the visual basic editor
 
Visual basic
Visual basic Visual basic
Visual basic
 
Vb%20 tutorial
Vb%20 tutorialVb%20 tutorial
Vb%20 tutorial
 
Word 2007 intro
Word 2007 introWord 2007 intro
Word 2007 intro
 
Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0Introduction to Visual Basic 6.0
Introduction to Visual Basic 6.0
 
Apps in a Flash HCI
Apps in a Flash HCIApps in a Flash HCI
Apps in a Flash HCI
 
Introduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET ControlsIntroduction of VS2012 IDE and ASP.NET Controls
Introduction of VS2012 IDE and ASP.NET Controls
 
Unit2
Unit2Unit2
Unit2
 
Working with Operating System
Working with Operating SystemWorking with Operating System
Working with Operating System
 
Programming basics
Programming basicsProgramming basics
Programming basics
 
COM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptxCOM 211 PRESENTATION.pptx
COM 211 PRESENTATION.pptx
 
Buttons In .net Visual Basic
Buttons In .net Visual BasicButtons In .net Visual Basic
Buttons In .net Visual Basic
 
2 working with operating system
2 working with operating system2 working with operating system
2 working with operating system
 
visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginner
 
Vp lecture1 ararat
Vp lecture1 araratVp lecture1 ararat
Vp lecture1 ararat
 

Recently uploaded

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Recently uploaded (20)

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

Visual Basic IDE Intro.pdf

  • 1. INTRODUCTION Programming in general is the process of making instructions for a computer to follow.
  • 2. VB.NET Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework. Although it is an evolution of classic Visual Basic language, it is not backwards-compatible with VB6, and any code written in the old version does not compile under VB.NET.
  • 3. IDE IDE stands for Integrated Development Environment. These are tools that are used for programming using a certain programming language. Each programming languages have their own IDE and feature that will help in compiling and checking of errors in your code.
  • 4. IDE The .Net framework is a revolutionary platform that helps you to write the following types of applications: • Windows applications • Web applications • Web services
  • 5. IDE Microsoft provides the following development tools for VB.NET programming: • Visual Studio 2010 (VS) • Visual Basic 2010 Express (VBE) • Visual Web Developer
  • 6. PARTS OF THE VB.NET IDE
  • 7. PARTS OF THE VB.NET IDE
  • 8. PARTS OF THE VB.NET IDE
  • 9. PARTS OF THE VB.NET IDE
  • 10. PARTS OF THE VB.NET IDE The Toolbox is the part where every control that can be used in your program is located. Most of the things that are inside the toolbox are arranged alphabetically and you can also arrange it in a way that you like.
  • 11. PARTS OF THE VB.NET IDE • The Solution Explorer is the part that shows every file in your project you can see all the files shown here if you look on the directory of the project.
  • 12. PARTS OF THE VB.NET IDE The Properties is the part that shows every property of the control and events that can be used with it (more on this on the next topic).
  • 13. PARTS OF THE VB.NET IDE The [Design] Window is where you can see what your form looks like and you can arrange the control in it accordingly.
  • 14. PARTS OF THE VB.NET IDE Double Clicking a control on the design window will show a sub for the control in the code-behind file of the form.
  • 15. PARTS OF THE VB.NET IDE • Each form in your solution have a code-behind file where you can put the command that’s going to be associated for the control.
  • 16. PARTS OF THE VB.NET IDE •In case you accidentally closed one of the windows. You can open it again by clicking the “View” tab on the Menu strip on the top of the window.
  • 17. CONTROLS The items in the toolbox are the controls. Each control are tools that can be placed in the form to perform various tasks. Here are some of the controls that you can use in your program. In order to put one on your form, you can click and drag the control from the toolbox or click then resize the control
  • 18. CONTROLS • The use of a button is to run the code that is assigned when the button click event happened. • The textbox is one of the ways that your program can accept user input.
  • 19. CONTROLS • The use of a button is to run the code that is assigned when the button click event happened. • The textbox is one of the ways that your program can accept user input.
  • 20. CONTROLS • The picturebox is the control that is used to place images on your forms. • The use of label is to put text on your form. It is generally used to display some informative text on the GUI which is not changed during runtime.
  • 21. CONTROLS • The picturebox is the control that is used to place images on your forms. • The use of label is to put text on your form. It is generally used to display some informative text on the GUI which is not changed during runtime.
  • 22. CONTROLS • Checkbox are used for multiple selections. An example of using it is on questions like “What three items in a list do you like most on this list of items?” • Radiobutton are the counterpart of checkbox but in a group of radiobuttons, only one of the will always be selected.
  • 23. CONTROLS • Checkbox are used for multiple selections. An example of using it is on questions like “What three items in a list do you like most on this list of items?” • Radiobutton are the counterpart of checkbox but in a group of radiobuttons, only one of the will always be selected.
  • 24. CONTROLS • ComboBox are like textbox but will accept multiple text using their “Item” property and have a dropdown button to show all its contents. • Listbox are similar to combobox with their difference is that the items are shown.
  • 25. CONTROLS • ComboBox are like textbox but will accept multiple text using their “Item” property and have a dropdown button to show all its contents. • Listbox are similar to combobox with their difference is that the items are shown.
  • 26. CONTROLS • MenuStrip are the list of intractable buttons that are permanently located of the top part of the form. A pop up version of it is the “ContextMenuStrip”.
  • 27. PROPERTIES • Each control has properties that govern how one can interact with it and what it can react to. Also properties define how the control will look like.
  • 28. PROPERTIES • Most controls have the same properties and if more than one control is selected, all the properties that the selected controls shared will be the only ones that are shown. In order to view the properties of a control, click one and it will show its properties in the property window like these.
  • 29. PROPERTIES The icons below on the top of the properties window have different effects. • The first 2 are for sorting the properties by uses or alphabetically. • The next 2 are for the properties and events associated with the control. • The last one is used to show the property page of the whole project.
  • 30. PROPERTIES Now here are some of the commonly used properties and their uses: • (Name) – The use of this property is to give the control a name that is used to call the control on the code. You can use alphanumeric characters in the name of your control but try to name your control with something that will remind you of what that control do.
  • 31. PROPERTIES • Text – This property contains the text that will be shown by the control. It is used to get or set the text of the associated control. • ForeColor, BackColor – This property change the color of the text and the background color of the control respectively.
  • 32. PROPERTIES • Enabled - Gets or sets a value indicating whether the control can respond to user interaction. • Visible - Gets or sets a value indicating whether the control and all its child controls are displayed.
  • 33. PROPERTIES • Location – Gets or sets the location of the control from the reference point which is the upper-left corner of the form. • Size - Gets or sets the height and width of the control.
  • 34. PROPERTIES In order to use the property of the control, you must first call the (Name) property of the control then call the respective property that you are using or changing.
  • 35. EVENTS The other tab of the Properties window is the Events Window.
  • 36. EVENTS When you double click a control on the [Design], the default Event will be selected. You can choose which event to use by going to the events window and selecting
  • 37. EVENTS Here are some of the events that you can find in the Events window: • Click– This event happens when the control is clicked.
  • 38. EVENTS • MouseEnter – This occurs if the mouse pointer enters the visible part of the control. • TextChanged – Occurs when the text property of the control is changed.
  • 39. EVENTS • KeyPress– Occurs when the control receive keyboard input the the key is released. • Enter– Occurs when the control becomes the active control of the form.
  • 40. HELLO WORLD Open the “Microsoft Visual Basic 2010 Express”, create a new project, set it to “Windows Form Application” and name it “HelloWorld”. Click ok.
  • 41. HELLO WORLD Save the project on the specified folder given by the trainer.
  • 42. HELLO WORLD On the toolbox, select the “Button” and place in the form as shown in the screenshot below.
  • 43. HELLO WORLD Double-click the button control and the code behind file will show up. After that, type the following code on the area as shown in the image: MsgBox(“Hello World!”)
  • 44. HELLO WORLD Run the program by pressing the “F5” key and click the button. The result must look like in the picture below.
  • 45. NAMING CONVENTIONS Control type pref ix Example Form frm frmEntry Label lbl lblHelpMessage Text box txt txtLastName Button btn btnConfirm List box lst lstPolicyCodes Combo box, drop- down list box cbo cboEnglish Picture box pic picVGA Check box chk chkReadOnly Radio Button opt optEnabled Timer tmr tmrAlarm • Naming Conventions are optional, they serve as guidelines in order to easily understand your code.
  • 46. LAYOUT • As you’ve tried to make your own program, you have designed it and possibly have trouble designing your form. A Tool that can help you is the Layout Toolbar. • You can access it by right-clicking the menu bar and selecting “Layout”.
  • 47. LAYOUT • After selecting the Layout toolbar, the toolbar will show up. We will go through the uses of it that is mostly used.
  • 48. LAYOUT • The items above are used for alignment of different controls. To the left, right, middle, top, center and bottom. Just remember that the alignment that is followed comes from the selected control with a white box in the corner as seen on the image to the right.
  • 49. LAYOUT • On the image, a Label, TextBox and a Button are selected. The Textbox have the white box on its border which means that the alignment or any Layout selection done will from the location of the TextBox.
  • 50. LAYOUT • This is used for changing the size of the selected controls to follow the size of the selected control with a white box if the other controls can change size.
  • 51. LAYOUT • The items above are used for the spacing of each control either horizontal or vertical.
  • 52. LAYOUT • The items above are used for the alignment to the center or middle with respect to the form itself.
  • 53. LAYOUT • The items above are used for overlapping controls to put one control above or below another.
  • 54. LAYOUT • The item above is “Tab Order”. It is used for any interact able controls so that when you press tab stop, you can choose which control will get focused next.
  • 55. LAYOUT • On the picture to the left, if you click “Tab Order”, it will show you the order of which control will receive the focus next.
  • 56. LAYOUT • You can click the numbers to change which control will be selected next. Click the “Tab Order” button again to finalize the changes.