DOCUMENT NO. : CAG 07H
SARADHA COURSE GUIDE – PROGRAMMING WITH
REV. NO.: R0 DATE: 23/07/2020
GANGADHARAN VISUAL BASIC
COPY :
COLLEGE
DOCUMENT TITLE PAGE 41 OF 70
UNIT III
VB FORM BASICS & TOOLBOX Edition : 1
CONTROLS
FORMS
In Visual Basic, form is the basic of GUI. Form is the container for all the controls that make up the
user interface. When a Visual Basic application is executing, each window it displays on the desktop is
a form.
Figure: VB Form & its elements
Every Visual Basic control consists of
three important elements
Properties which describe the
object
Methods cause an object to do something and
Events are what happens when an object does something.
Properties
The properties describe the appearance of the GUI component. A property is a value or characteristic
held by a Visual Basic object. Properties can be set at design time by using the Properties window or at
run time by using statements in the program code.
Object.Property = value
Where
Object is the name of the object you're customizing.
Property is the characteristic you want to change.
Value is the new property setting.
For example, a property called Text used to modify the title that appears on the window or any control.
Form1.Text = “Sample”
You can set any of the form properties using Properties Window. Most of the properties can be set or
read during application execution.
/tmp/unoconv_2786007599.doc
PREPARED/REVISED BY : F. Jeno Sandana Brina Rouvier REVIEWED & APPROVED BY : D. Saraswathi
DESIGNATION : Asst. Prof. – B.C.A DESIGNATION : Asst. Prof – M.Sc(CS)
DATE : 21/07/2020 DATE : 23/07/2020
, MANUAL TITLE
DOCUMENT NO. : CAG 07H
SARADHA COURSE GUIDE – PROGRAMMING WITH
REV. NO.: R0 DATE: 23/07/2020
GANGADHARAN VISUAL BASIC
COPY :
COLLEGE
DOCUMENT TITLE PAGE 42 OF 70
UNIT III
VB FORM BASICS & TOOLBOX Edition : 1
CONTROLS
Figure: Property Window
Common Properties:
Name It is used to define the name of the control.
Font The font of text to be displayed on the control
Enabled It uses the True or False value to enable mouse or keyboard events.
Text To display title of the object
TextAlign The alignment of the text(left, center, right, bottom, middle, top)
Visible To make visibility True or false during the runtime
/tmp/unoconv_2786007599.doc
Methods
PREPARED/REVISED BY : F. Jeno Sandana Brina Rouvier REVIEWED & APPROVED BY : D. Saraswathi
DESIGNATION : Asst. Prof. – B.C.A DESIGNATION : Asst. Prof – M.Sc(CS)
DATE : 21/07/2020 DATE : 23/07/2020