VB6
beginners tutorial - Learn VB6
Advanced
VB6 tutorial - Learn Advanced VB6
Systems
Analysis - System analysis and Design tutorial for Software Engineering
|
You are here: Visual
Basic > Advanced VB6 tutorial
> Chapter 16
Adding Components to an MTS Package
After you have created your empty package, it follows that you
will be adding components to the package. Keep in mind that for a COM component
to be compatible with MTS, it must be compiled as an ActiveX DLL. A component
can be added to a package in a couple of ways:
-
Component Wizard. The Component Wizard guides you through
the process of adding a component Step by step. Within the Component Wizard, you
can add components that are either already registered on the machine or you can
install a new component. In the latter case, the Component Wizard automatically
registers the ActiveX DLL’s class information for you.
-
Drag and drop. The MTS Explorer enables you to drag a DLL
from the Windows Explorer that contains the components you want to add onto the
package in the window. If the DLL you are dragging is unregistered, the MTS will
register it for you.
It is quite possible for a component to be added to multiple packages.
You might find that separate MTS applications might have different security needs,
but that they use the same components. Putting the same component into separate
packages will meet this requirement.
To use the Component Wizard to add a component that is already
registered, you must execute the following steps:
STEP BY STEP
16.3 Adding a Component That Is Already Registered
-
From MTS Explorer, double-click to expand the computer that contains the package
you will be adding a component to.
-
Double-click and expand the target package. You will see that there are two
subfolders off of the package. These subfolders are standard to all packages in
MTS. The Roles subfolder relates to security settings (see Chapter
15, "Understanding the MTS Development Environment").
-
Select the Component subfolder. From the Action menu, choose New, and then
choose Component. Alternatively, with the Component subfolder selected, you can
right-click to get the same menu in the form of a pop-up menu, or you can click
on the New Object button from the toolbar.
-
The Component Wizard first asks whether you want to install a new component
or to install components that are already registered, as in Figure 16.4. If the
MTS machine is also the development machine, it is likely that the component will
already be registered.
FIGURE 16.4 The Component Wizard guides you through the process of adding
components to a package.
-
Click on the import component(s) that are already registered button.
-
This brings you to the Choose Components to Import window. The wizard will
then build a list of all the registered components, as in Figure 16.5. Depending
on the number of components that you have registered, this could take a few seconds
or more than a minute. Notice that only in-process components are listed.
FIGURE 16.5 In-process components that are registered on the MTS machine will
be listed by name or class ID.
-
By default, only the names of the components are listed. You can select the
Details check box, and the path to the associated file that contains the file
will be displayed as well as the Class ID of the component.
-
Select the component you wish to add. You can add as many components that are
registered as you wish by holding the Ctrl key down as you select them.
-
After you finish adding components, click on the Finish button.
<< Previous | Contents
| Next >>
|
|