Vous êtes sur la page 1sur 5

CBSE

Class 12 Informatics Practices


Revision Notes
Chapter - 4
Visual Basic Revision Tour

Intrinsic Controls in Visual basic


The visual basic 6.0 provides some standard controls on its control box which are known as
intrinsic control. These are built-in controls and are contained in Visual basic .EXE file. These
are different from the extrinsic controls (ActiveX objects and Insertable objects) in the sense
that they always reside in the control toolbox, while the others are required to be inserted
through the components.

TOOL BOX

Material downloaded from myCBSEguide.com. 1 / 5


The following table is describing the basic controls, their functionality, naming conventions
and some important properties and commonly used methods. The letters in ITALICS show
the methods generally used with these properties.

Describing the intrinsic control

Naming
S. No. Control Important properties Functionality
Convention

Borderstyle, picture, Displays a graphic


1. Picture Box Pic autosize from a bitmap, icon
LoadPicture() or metafile.

Alignment, Displays text that a


2. Label Lbl wordwrap, autosize, user can't change
borderstyle directly.

Text, max length, Displays information


multiline, scrollbar, entered at design
3. Textbox Txt
password character, time by the user, or in
seltext, selstart code at run time.

Provides an
Visible, borderstyle,
4. Frame Fra identifiable grouping
appearance
for controls.

Looks like a push

Command Enabled, font, style, button and is used to


5. Cmd
button top visible. begin, interrupt, or
end a process.

Displays an X when
Alignment, enabled, selected; the X
6. Checkbox Chk
value disappears when the
Checkbox is cleared.

Material downloaded from myCBSEguide.com. 2 / 5


7. OptionButton Opt Alignment, enabled, Displays an option
value, style that can be turned on
or off.

Combines the
Appearance, features of a TextBox
8. ComboBox Cbo
borderstyle, visible. control and a ListBox
control.

Multiselect , sorted, Displays a list of items


style AddItem(), from which the user
9. List Box Lst
RemoveItem(), can select one or
Clear(), list() more.

Provides a horizontal
Min, max, Value,
scroll bar for easy
10. HScrollbar hsb LargeChange,
navigation through
smallChange
long lists of items.

Min, max, Value,


Provides a vertical
11. VScrollbar vsb LargeChange,
scroll bar.
smallChange

A control which can


execute code at
Enabled, interval,
12. Timer tmr regular intervals by
index Timer()
causing a Timer
event.

Enables a user to
13. DriveListBox drv drive select a valid disk
drive at run time.

Displays directories
14. DirListBox dir path
and paths at run time.

Material downloaded from myCBSEguide.com. 3 / 5


Locates and lists files
15. FileListBox fil Path, pattern in the directory
specified by the Path
property at run time.

A graphical control

Only for decorative displayed as a

purpose on Form rectangle, square,


16. shape shp
Shape, bordercolor, oval, circle or

fillcolor rounded rectangle or


square.

Only for decorative


A graphical control
purpose on Form
displayed as a
17. Line lin Shape, bordercolor,
horizontal, vertical or
fillcolor, borderstyle,
diagonal line.
borderwidth

Appearance,
18. Image img borderstyle, picture, Displays a graphic.
stretch LoadPicture()

DatabaseName, Provides access to


19. Data dat recordsource, databases using a
Readonly, exclusive Recordset object.

Enables you to add


Class. Sourcedoc,
insertable objects to
20. OLE ole Sourceitem,
the forms of your
OLETypeAllowed
applications.

Name, Caption (or text in case of textbox), font, are common properties of all controls which
are related to the controls basic properties.

How to use the properties within a particular control:


Syantax: Controlname. property=value

Material downloaded from myCBSEguide.com. 4 / 5


Ex:- txtcountry.text=”India” here the txtcountry is a text box assigned a value of “India " to its
property text.

How to use the properties within a particular control:


Syantax: Controlname.method(parameters)
Ex:- lstname.additem(“my name”) the method additem is here adding a new item in the
listbox.
The codes using these properties and/or methods are generally written either within a
function, procedure or an event-procedure while writing a VB 6.0 programs.

Control Categories :
There are three broad categories of controls in Visual Basic:

Intrinsic controls, such as the command button and frame controls. These controls are
contained inside the Visual Basic .exe file. Intrinsic controls are always included in
the toolbox, unlike ActiveX controls and insertable objects, which can be removed
from or added to the toolbox.
ActiveX controls, which exist as separate files with a .ocx file name extension. These
include controls that are available in all editions of Visual Basic (DataCombo, DataList
controls, and so on) and those that are available only in the Professional and
Enterprise editions (such as Listview, Toolbar, Animation, and Tabbed Dialog). Many
third-party ActiveX controls are also available.
Insertable Objects, such as a Microsoft Excel Worksheet object containing a list of all
your company's employees, or a Microsoft Project Calendar object containing the
scheduling information for a project. Since these can be added to the toolbox, they can
be considered controls.

Material downloaded from myCBSEguide.com. 5 / 5

Vous aimerez peut-être aussi