VISUAL BASIC_6
 

2. Projects Using  Intrinsic and Professional ActiveX Controls(1)


Objective of this Lesson:

The objective of this lesson is to create the following projects illustrating the use of Intrinsic and Professional ActiveX Controls.

·         Creating Digital Clock using the Intrinsic Timer Control

·         Creating  Bar Chart using the Professional MS Barchart Control

·         Creating Project using Combo Box

What is ActiveX?

ActiveX is a reusable and portable software component or control built according to what are called COM(Component Object Model) specifications.   It is the brainchild of Microsoft.   It is the practical realization of the philosophy, “write once use anywhere and everywhere”.    It provides a building block solution to complex problems.   We  have already seen that VB-6 comes with certain intrinsic ActiveX controls which offer some functionalities    Such controls can be used not only in VB, but also in other ActiveX compliant languages like VC++., VJ++, Delphi  etc.

Can you Create Your own ActiveX Controls?

It is well known that any complex application is made of compatible combinations of some basic functionalities.  If you have predefined ActiveX controls to provide these basic functionalities, VB-6 offers language support to package the basic controls to another new single ActiveX control thereby providing an ActiveX solution to the complex problem.    In fact VB-6 has been developed essentially as a Control Creation Language.  Possibly you can visualize a scenario when every complex application will be solved by a single user created aggregate ActiveX control.

Visual Basic  ActiveX Controls:

When you start VB, the first window called the design window shows some 20 intrinsic controls like label, command button, option button etc., in the Toolbox.   These controls cannot be removed from the Toolbox.   The Professional Edition of VB provides some  34 more ActiveX controls which can be brought into the Tool box before using them.    These controls can be added to or removed from the Toolbox.   In order to view all the VB ActiveX controls  select ‘New Project’ from the File Menu.   You will get the New Project Menu as shown in the figure 1.   Click on the ‘VB Pro Edition Control’.   The Toolbox of the Design Window will now show the icons of all the ActiveX controls as shown in the figure 2.   When you move the mouse pointer over the icon,  the names of the controls will appear below them.

 

                                                                      Figure 1

 
                                                          Figure 2


 

Copyright © 2001 Selfonline-Education. All rights reserved.