Local Media2334009474113870747

You might also like

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

VISUAL BASIC

CONTROLS
And
Properties

www.arellano.edu.ph
Objectives:

• Visual Basic Controls


• Prefixes for naming VB controls
• Most commonly used controls
• Control Properties

www.arellano.edu.ph
VISUAL BASIC CONTROLS
An object is a type of user interface element
you create on a Visual Basic form by using a
toolbox control. Every Visual Basic control
consists of three important elements −

•Properties which describe the object

•Methods cause an object to do something

•Events are what happens when an object


does something.

www.arellano.edu.ph
Visual Basic Controls

Visual basic toolbox


contains the controls
which are used in the
form design.

www.arellano.edu.ph
VISUAL BASIC CONTROLS
CONTROLS DEFINITION DEFAULT PREFIX
NAME

Button Enable the user to initiate a Button1 btn


program actions.
Checkbox Allow the user to make multiple CheckBox1 chk
selections from a number of
options.
ComboBox Enables the user to select an ComboBox1 cmb
entry from a list or enter a new
value
CheckListBox Allows you to select items or a ChekListBox clb
range of items. 1

DataGridViewer Allows you to view data from DataGridVie dgp


database. w1
GroupBox Used to group controls GroupBox1 grp
VISUAL BASIC CONTROLS
CONTROLS DEFINITION DEFAULT PREFIX
NAME
Labels Displays text that the user Label1 lbl
cannot directly modify.
LinkLabel Returns all of the label(s) from LinkLabel1 lkl
the specified label link base.

ListBox Displays a list of items from ListBox1 lst


which the user can select on or
more entries.
PictureBox Displays graphic image. PictureBox1 pic

ProgressBar Used to represent the progress ProgressBar bar


of a lengthy operation. 1

RadioButton Option button that allows the RadioButto1 rdb


user to choose only one of a
predefined set of options.
VISUAL BASIC CONTROLS
CONTROLS DEFINITION DEFAULT PREFIX
NAME
TextBox Display Text That the user can TextBox1 txt
edit.
Timer Allows the user to set a timer Timer1 tmr
interval to execute an event.

MonthCalendar Allows you to select particular MonthCalen mnd


date. dar1
CONTROLS PROPERTIES

All the Visual Basic Objects can be moved,


resized or customized by setting their
properties. A property is a value or
characteristic held by a Visual Basic object,
such as Caption or Fore Color.

Properties can be set at design time by using


the Properties window or at run time by using
statements in the program code.

www.arellano.edu.ph
CONTROLS PROPERTIES

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.

Example:
Me.Text=“ My First Program”
Me.BackColor= Color.Aqua

www.arellano.edu.ph
Output:
www.arellano.edu.ph

You might also like