Show: Delphi C++
Display Preferences

Import Component Wizard

From RAD Studio
Jump to: navigation, search

Go Up to Component Menu

Component > Import Component

Use this wizard to import a type library, an ActiveX Control, or a .NET assembly as a component in your project.

If you select Import Component with no project open, you need to choose VCL for C++ Win32 or VCL for Delphi Win32.

The following files are generated by the Import Component wizard:

  • For Delphi: *+TLB.dcr, *_TLB.pas.
  • For C++: *_OCX.dcr, *_OCX.cpp, *_OCX.h, *_TLB.cpp, *_TLB.h.
Note: Not all of the features described here are present for every instance of the wizard.
Type of Component option Description

Import a Type Library

Click to import a type library that is already registered on your system. This type library will be the ancestor of the component you are going to create.

Import ActiveX Control

Click to import an ActiveX Control that is currently registered on your system. This ActiveX Control will be the ancestor of the component you are going to create.

Import .NET assembly

Click to import a .NET assembly as a COM object. The GAC registered .NET assembly that you select will be the ancestor of the component you create.


Registered Type Libraries page, ActiveX Controls page, or .NET Assemblies page

Depending on the type of component you selected in the previous step (on the Import Component page), this page will show a list of registered type libraries, a list of ActiveX Controls, or a list of .NET assemblies in the Global Assembly Cache.

Note: The Import Component wizard looks only at the 32-bit Registry. So when running on a 64-bit system, you must use TLIBIMP.EXE directly if you wish to import a 64-bit specific type library or ActiveX control.


Item Description

Component list

Displays a list of registered type libraries, ActiveX Controls, or .NET assemblies in the Global Assembly Cache. Select the component you want to use.

Search GlassSearch

Enter a search string. The list automatically includes only those items that match your search string. Click X to clear the search string.

Add

Click to browse for a new component to add to the list. Opens either the Register OLE Control or the Register .NET Assembly dialog box.

Component page

On the Component page, edit the parameters that are used to import the component into the IDE.

Item Description

Class Name(s)

Displays the name of the class (or classes) that will be created.

Click the ellipsis to open the Class Names dialog box, where you can edit the name of the class.

Palette Page

Select the Tool Palette category where you want the components to appear.

Unit Dir name

Enter a directory for the unit that will contain the component, or click the [...] button to navigate to the directory where the unit file will reside.

Search path

Enter the search path for the new component. The default value is the library search path from the Project Options dialog (for Delphi, the Library search path is on the Directories/Conditionals page; for C++, the Paths and Defines page). The directory designated in the Unit dir name field will be appended to the search path. Invalid entries are ignored.

Generate Component Wrappers

Generates IDE component classes that wrap the interfaces of each CoClass so that they can be used on the Form Designer.

Create Unit page

Specify whether you want to create a new unit, install the new component in an existing package, or install the component in a new package. If you have a project open, you have an additional choice, to add the component to the current project.

Item Description

Create Unit

Click to cause the IDE to create a new unit. Click Finish to install the component and close the wizard.

Install to Existing Package

Click to install the new component into a package that already exists. Click Next to continue to the Existing Package page of the wizard.

Install to New Package

Click to cause the IDE to generate a new package. Click Next to continue to the New Package page of the wizard.

Add unit to <my_project>

Click to install the new component in the specified project. Click Finish to install the component and close the wizard.



Existing Package page

Allows you to select an existing package in which to install the new component.

Item Description

Search GlassSearch

Enter a search string. The interface list automatically includes only those packages that match your search string. The string can be present in any field of any record being displayed on this page. You can also copy and then paste in this field the entire record and all its fields. Click X to clear the search string.

Installed package list

Select a package from the list of all the packages currently installed on the system. Package Name, Description, and Filename are given for each package.

Browse

Click Browse to look for a package that is not on the list.

Finish

Click Finish to install the component and close the wizard. The new component opens in the Code Editor.



New Package page

Allows you to enter the name of a new package that the wizard will create to contain the new component.

Item Description

Package name

Enter a file name for the new package. Click the [...] button to navigate to the folder where the new package will reside and to specify a file name. If you provide only a file name, the package will be created in the default projects directory. For Delphi projects, you need to specify a .dproj file; for C++ projects, specify a .cbproj file.

Description

Enter a description for the new package.

Finish

Click Finish to install the component and close the wizard. The new component opens in the Code Editor

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance