To Visual Basic: Prepared By: Mercy Ann G. Giere

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 20

Introduction

to Visual Basic
Prepared by:
MERCY ANN G. GIERE
Visual Basic
 A high level programming language
 It is created by Microsoft
 Uses a graphical environment called the
Integrated Development Environment (IDE)
 It is capable of developing Windows based
applications and games
 An Event-driven language
 A visual basic program is made up of many
subprograms, each with its own codes, that
can run independently at the same time can
be linked together.
Commonly Used Terms
1. Application – collection of objects that
work together to accomplish certain task/s
for its users.
Example: Microsoft Word, Adobe
Photoshop, Corel Draw
2. Project – the term used in Visual Basic
pertaining to Application.
Examples: Payroll System, Quiz Bee
Scoring Program
3. Object – a piece of software that has
properties and functions that can be
managed or controlled
Examples: a window, dialog box
4. Property – characteristics of an Object
Examples: color, size, background
5. Methods – functions of an object that
can be manipulated
Examples: opening, resizing, moving(of a
window)
6. Object-Oriented Environment - a place
wherein application is created using objects
and combining them to produce an
output.
Examples: Visual Basic environment
7. Event – an action that happens
Examples: Clicking of a button, clicking of
menu, loading a form
8. Event-Driven – an operation is executed
as the result of some kind of event
8. Event-Driven – an operation is executed as
the result of some kind of event.
9. Form – the first object you will see on the
screen when you open Visual Basic. It is where
all controls are placed. It is also where you will
enter data and see results.
10.Controls – the objects you put in a form
Examples: text box, label, command button
11.Code – computer instructions written by the
programmer. These will indicate what the
action or result will be when an event occurs.
Examples: getting the total of 2 numbers once
the button is clicked.
12. Script – other name for code
13. Design Time – a time when you visually
design and layout the forms and the
objects on it.
14. Run Time – a time when the program is
executed.
Starting Visual Basic
1. Click Start on the Task bar.
2. Select Programs, Visual Studio and
then Microsoft Visual Basic 6.0.
–or–
- Click Start on the Task bar.
- Select Programs.
- Use the Windows Explorer to find the Visual
Basic executable file.
3. Double-click the Visual Basic icon.
You can also create a shortcut to Visual Basic,
and double-click the shortcut.
The Visual Basic Integrated
Development Environment (IDE)
Title Bar Project
Menu Bar Tool Bar Window

Form

Properties
Window

Toolbox
Parts and Functions:
1. Title Bar – shows the title
2. Menu Bar – consists of different menu
that hold different functions
3. Toolbar – contains several buttons for
commonly used commands
4. Project Window – contains the project
files and the project files and groups
them by type
5. Toolbox – contains different controls for
objects that can be placed in the form.
6. Form – the working area where the different
controls are displayed
7. Properties Window – displays attribute of the
currently selected component (form or
control)
8. Form Layout Window – shows the form’s
position on the screen when the program is
executed.
Project Window
View Toggle
Object Folders
View Code

Project Name

Forms Folder

Form Module
Project Window Buttons:
a. View Code Button – opens the window
for writing Visual Basic codes.
b. View Object Button – displays the form
c. Toggle Folders Button – shows or hides
the content of the Forms Folder
Controls on the Toolbox
Control Description

Provides a way to move and resize the controls


Pointer
form

Displays icons/bitmaps and metafiles. It displays


PictureBox
text or acts as a visual container for other controls.

TextBox Used to display message and enter text.


Serves as a visual and functional container for
Frame
controls
Used to carry out the specified action when the
CommandButton
user chooses it.
CheckBox Displays a True/False or Yes/No option.
OptionButton control which is a part of an option
OptionButton group allows the user to select only one option
even it displays mulitiple choices.
ListBox Displays a list of items from which a user can select one.

Contains a TextBox and a ListBox. This allows the user to


ComboBox select an ietm from the dropdown ListBox, or to type in a
selection in the TextBox.

HScrollBar
These controls allow the user to select a value within the
and
specified range of values
VScrollBar

Timer Executes the timer events at specified intervals of time

Displays the valid disk drives and allows the user to select
DriveListBox
one of them.

Allows the user to select the directories and paths, which are
DirListBox
displayed.
Displays a set of files from which a user can select the
FileListBox
desired one.
Used to add shape (rectangle, square or circle) to a
Shape
Form

Line Used to draw straight line to the Form

used to display images such as icons, bitmaps and


Image
metafiles. But less capability than the PictureBox

Enables the use to connect to an existing database


Data
and display information from it.
Used to link or embed an object, display and
OLE manipulate data from other windows based
applications.
Displays a text that the user cannot modify or interact
Label
with.
Form – the working area where the
different controls are displayed

You can resize a form by dragging the


handles
Properties Window
Name of Type of Control (eg.
Control or Form Form, Command)

Property Name Property Value

Property Description
References:
 Visual Basic 6.0
By Tito B. Amoto Jr. and et al.

You might also like