By :
Ashish Sharma 0901ET161015
Kuldeep Sharma 0901ET161028
Neetesh Srivastava 0901ET161034
Shivam Sharma 0901ET161046
Content
What is Visual Basic?
History
How to start Visual Basic?
Visual Basic environment.
Tool Box
Project window
Controls and control properties
Visual Basic Editor
Form Window
Development of an application
How to place controls on the form?
Properties of controls
Events and methods
Common Controls
Making of a program
What is visual basic ?
It a third generation event driven programming
language and a integrated development
environment from Microsoft.
The word visual stands for Graphical user
interface (GUI).
The word BASIC refers to BASIC (beginners all
purpose symbolic instruction code).
Visual basic has evolved from original basic
language and now contains several hundred
statements, functions and keywords. Many of
which relate directly to the window GUI.
Data access features allow you to create
database from end application. An scale level
servers slide components for most popular
database formats, including Microsoft SQL
server and other enterprise database.
Internet capabilities make it easy to provide
excess to document and application across the
internet or intranet from within you application
or create internet server application.
History
Visual basic 1.0 was introduced in 1991 by
Allen cooper using Tripod.
It was further developed by Allen and his
associates under a contract with Microsoft.
Microsoft decided to combine ruby with the
basic language to create visual basic.
The ruby interface generated provide the visual
part of Visual Basic and this was combine by
‘EB’ Embeded BASIC engine design for
Microsoft's abandoned ‘Omega’ database
system.
Many releases of versions happened like 2.0 and
others but the final release was 6.0 which was
released in 1998.
Although vender support for visual basic 6 has
been ended since 2008 and the product has never
been supported in the latest version of windows.
Key part of the environment still work on newer
platform. It is possible to get a subset of
development environment working on 32-bit and
64-bit version of window vista, window 7, window
8 and window 10.
In 2016 Visual basic got ‘Technical impact award’
at the 19th D.I.C.E. Awards.
HOW TO START VISUAL BASIC ?
To start visual basic, the steps are-
1.click on start programs
Microsoft visual basic studio 6.0
Microsoft visual basic 6.0
2.The new project window appears
The new project window has three tabs:-
1)NEW: To start a new project.
2)EXISTING: To select from a list of existing
projects.
3)RECENT: To select from the list of
recently opened projects.
In the new tab ,select standard.exe
application .this opens the Microsoft
visual basic window.
Visual Basic Environment
Toolbar
Menu Bar Project
Explorer
Toolbox
Form
Properties
Window
Form Designer
Form Layout
Window
Tool box
The toolbox contains icons that represent commonly used
controls such as label , textbox , command button etc.
Project window
It displays a list of all forms that makes up the application. It has
three buttons on the top left.
1.Click on view object to open a form.
2.Click on view code to open code window.
View Select
Code form
View
object
Controls
Label
Frame
Text Box
Command Button
Combo
Check Box Box
Option Button
List
Box
Control Properties
The most common and important
object properties are :-
Name
Caption
Left
Top
Height
Width
Enabled
Visible
The visual basic editor
FORM WINDOW
The form window is the
primary work area that forms
The background of the
application .The user can draw
objects on the form.
Development of an application
In VB, an application can be developed by the
following steps:
1.Create a form
2.Place controls on the form
3.set properties or the control
4.Add code to the handle the events
The controls in the toolbox can be called objects in VB.
every control is associated with its individual properties ,methods
and events.
How to place controls on the form ?
A control can be placed on a form using two
methods.
FIRST METOD
Double click on the control in the icon in the toolbox.
The control appears in the middle of form.
TO CHANGE THE POSITION OF THE CONTROL:
click the control
Drag it to the new location.
To resize the control just click on the control and resize the pointers
on its edges and corners.
I. Drag the edges pointer for changing the size either horizontally or vertically.
II. Drag the corner pointers for changing the size diagonally.
SECOND METHOD
Click on the control icon in the toolbox and then click on the desired
location on the form. Drag the mouse diagonally so that the control
has the desired size.
To reposition the control ,hold down the left mouse button and drag
the control to a new location.
To resize the control, click the control, drag one of its edges or
corners.
Delete a control
CLICK ON
DELETE
Form object
To create a VB application ,we need an interface for the user to interact.
The form is where the interface is drawn. some of the common
properties , events and methods are:
Properties
CAPTION :It sets the title of the form
NAME : It gives the name of the form with which it is
referred to in the code. The default value is form.
APPEARANCE: value 1 makes the form look like three-
dimensional. Value 0 makes the form look
flat.
FONT: It sets the font type ,font style and font size
for the text.
FORE COLOR : It sets the color for the text on the form.
ENABLED: Value true makes the form respond to mouse
and keyboard events. Value false makes the
form responding to any event.
BACK COLOR: It sets the form’s background color.
VISIBLE: Value false makes the form invisible.
Events
CLICK : Form-click event is triggered when the user clicks on the form .
LOAD : Form-load event is triggered when the form I loaded. This loads the
form into the memory.
Methods
PRINT :This prints text string on the form.
SHOW : This makes the form visible. It is the same as setting a form’s
visible property on true.
HIDE :This makes the form invisible
Common controls
POINTER
The pointer provides the way to resize or move the
other controls. This is automatically activated after
the user places a control on the form.
Label
Label is a control that can be used to display text that user can edit
directly.
Properties
NAME: This gives the name used to refer label in the code.
CAPTION: This is the text displayed in the label.
FONT: This sets font, font style and font size.
BORDER STYLE: This determines the type of border.
APPEARANCE: This is 3-d in appearance.
Events
CLICK: This event is triggered when the user clicks on the
Label.
DOUBLE CLICK: This event is triggered when the user double- clicks on
the label
Textbox
The text box is a control that is used To receive input from
the user and also to display the output. It can handle
String(text) and numeric data but not Picture or images.
Properties
NAME: This is the name used to refer to the
textbox in the code.
APPEARANCE: This Is 3-d Or Flat In Appearance
MAXLENGTH: This limits the length of the text.
Value 0 indicates limited length.
MULTILINE: This specifies whether the textbox
displays a single line or multiple
lines.
PASSWORD CHAR: This hides the text with a single
character(usually * is used).
ENABLED: Value true/false determines whether the textbox
responds to any event or Not.
Locked: Value true/false determines whether the textbox
contents can be changed or not.
Text: This is the string to be displayed in the
textbox.
EVENTS
CHANGE: This event is triggered every time when The textbox
displays a single line or multiple line.
METHOD
SetFocus: This Positions The Cursor Inside The Text Box.
COMMAND BUTTON
The command button is very important control as it is
Used to execute commands and it displays an illusion
That the button is pressed when the user clicks on it.
PROPERTIES
APPEARANCES: This is 3-d or flat in appearance.
CAPTION: This is the string that is displayed on the
command button.
VISIBLE: Value true/false determines whether it is visible
or not.
FONT: This Sets Font, font Style And Font Size.
ENABLED: Value true/false determines whether it responds
to an event or not.
EVENTS
CLICK: This event is triggered when it is selected by cliicking
on it.
Making of a program
Open the visual basic studio.
Then select the type of program whether it
is .exe or any other.
According to need put the components like
command button, text box etc.
Now write the program by opening the
editor.
For testing click on play sign in the menu bar
or going to run.
Thank you for listening
It was a try for giving basic understanding of
visual basic and it’s environment.