How to import an ActiveX control in BDS 2006?

Abstract: How to import an ActiveX control in BDS 2006?

  • Product Name: Borland Developer Studio
  • Product Version: 2006
  • Product Component: C++ Builder
  • Platform/OS Version: Windows


How to import an ActiveX control in BDS 2006?


Here's the procedure for importing and installing an ActiveX control in BDS 2006.

Open BDS 2006 and select File | New | Package - C++Builder.

Select Component | Import Component, select the appropriate kind of component, then hit Next.

Click the Add button and select your .ocx, .dll, .tlb, and so forth, file. Highlight the component in the list of controls and hit Next.

Set the Palette Page (this is where the component will appear in the tool palette) and pay attention to the Unit Dir Name field. The Unit Dir Name is the directory where your component's .cpp, .h, and other files will be generated. Hit Next.

Select "Add unit to PackageName.bdsproj project" and hit Finish.

Bring up the Project Manager and right-click on the package (the .bpl file) and click Install. This will build, register, and install the component into the tool palette.

Some additional notes follow. These are not vital to the control importation process but will help explain what happens...

In step #5, if you don't want the component to be installed into the tool palette, then select "Create unit" instead. The generated files will go into the directory specified by Unit Dir Name, which is C:\Program Files\Borland\BDS\4.0\Imports by default, and can still be used in your code.

Be sure to save your package project. The .bdsproj file is your package's project file, and the .bpl file is the compiled package.

Author: Rajini Billahalli