Question

I've written a series of ActiveX controls in Delphi to be used in other development environments (like Visual Studio or dBASE for Windows, as two examples)

I used the ActiveX wizards provided as part of the RAD Studio IDE to generate the ActiveX "bindings" (for want of a better word) for my VCL-based controls, however it appears not to produce the source necessary to make them appear on IDE component pallets.

Ordinarily on those IDEs (Visual Studio and dBASE Plus), I can simply import an ActiveX control and it will show up on their toolbox (their version of a component pallet) complete with their defined icon.

Well, my own ActiveX controls produced in Delphi do not (they import just fine, but don't show up on the pallet/toolbox), and I've been scouring Google trying to find a solution for the last two weeks.

Having failed miserably, I've decided to ask here:

How do I make my ActiveX controls show up on the Toolbox in Visual Studio (and others)?

Thanks for any advice/suggestions.

EDIT: Some extra info...

I've been trying to do this with both XE2 and XE3, and it has failed every time... however, when I do the same thing (using the Wizards) with Delphi 2007, the component's icon does show up in the Pallet/Toolbox of other IDEs as desired. This means the issue was introduced sometime after Delphi 2007, and is likely the result of some RTL/VCL modification.

Was it helpful?

Solution

My research has concluded that Unicode versions of Delphi (2009 to XE3) do not generate the correct markup for ActiveX Controls using the provided wizards.

Further-more, changes to the RTL and VCL since Delphi 2007 mean that, even if you produce the necessary source markup manually, your controls will not behave properly when embedded in non-Delphi applications (such as Visual Studio and dBASE Plus). Much of this relates to the VCL's presumption of a VCL-compliant Parent property value, where the update of properties such as ParentFont will result in an Access Violation error.

The solution in my case has been to produce the exported ActiveX Controls in Delphi 2007 (with it being the latest version to "play fair" with other ActiveX Control consumers)

Hopefully this information will save you the long and annoying fact-finding process I had to go through in order to come to this conclusion.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top