Referencing the EventTimer Class in Other Projects VB Help

To use a Class in another project you must first add a reference to the Class. This means that you must make the component available to the system by registering it as explained in the previous section. Once the DLL (or EXE) file of the component has been created and registered with the host system, fully project or other application on the system can use it. To add the Even timer Class to another project follow these steps:

1.Start a new project open the Project menu and select References to see the Reference dialog box. This dialog box contains all the objects you can reference in your projects.
2. Select the entry Event Tuner (objects are listed by their project name not the Class name) and click OK. After the Class has been added to the project y can examine its.interface with the Object Browser >
3. From the View menu, select Object Browser to see the window of Figure 15.In the top drop-down list select the newly added reference.

The Event Timer Class’
members viewed with the
Object Browser

FIGURE 15.6:

FIGURE 15.6:

4. The Event Tuner project exposes a single Class the Event Tuner Class whose name appears in the Classes pane. In the Members pane/you see the proper ties methods and events of the Class

If you select Elapsed time property in the Members pane with the mouse, you’ll see its description in the lower pane of the Object Browser. It’s a property of the Event timer.Event timer lass object and it’s read-only because the Class contain! . a Property Get procedure for this property. The other members are methods and events of the Class. A developer could probably figure out what this Class does by just looking at the members it exposes.

Posted on November 5, 2015 in Building AdiveX Components

Share the Story

Back to Top
Share This