You might want to use .NET components on your VCL.NET forms. There is no direct way to use .NET components. You can, however, wrap the components in an ActiveX wrapper, which then can be added to your VCL.NET application. RAD Studio provides the .NET Import Wizard to accomplish this task.
To use .NET components in a VCL.NET Form
- Run the WinForm Control Import Wizard.
- Build the package to create an assembly file.
- Add the assembly to the Tool Palette.
To run the WinForm Control Import Wizard
- Choose FileNewOtherDelphi for .NET ProjectsWinForm Controls Package. This starts the WinForm Control Import Wizard.
- Specify the following file:
- Click Next. This displays the second page of the WinForm Control Import Wizard and lists all of the available components.
- Check the check boxes next to the components you want to import.
Note: If you want to import all components, click the Check All button.
- Click Next. This displays the third page of the Wizard, which provides generation options for the units.
- Accept the defaults, and click Next. This displays the fourth page of the Wizard, which allows you to set a location and a name for the package file.
- Click Next. This displays the fifth page of the Wizard, which allows you to overwrite any existing files of the same name.
- Click Next. This initiates the generation process and displays status messages for each file as it is created, including the package (.dpk) file.
- If you want to import additional controls, click New. Otherwise, click Finish. The package containing the units appears in the Project Manager.
To build and add the package
- Select the package node in the Project Manager.
- Choose ProjectBuild <Project Name> from the main menu where <Project Name> is the name of your project. This creates the assembly file containing the package and the units.
- Choose ComponentsInstalled .NET Components.
- Click the .NET VCL Components tab.
- Click Add.
- Locate the package assembly, select it, and click Open. The location depends on your project options directory locations. The file might also end up in your default documents directory.
- Click OK. The individual controls appear in the Tool Palette under the WinForm Controls category. You can now add the individual controls to your VCL.NET form applications.