How to customize ActiveX controls on toolbars in Visual Studio (and others)

I wrote a series of ActiveX controls in Delphi that will be used in other development environments (like Visual Studio or dBASE for Windows as two examples)

I used the ActiveX wizards included with the RAD Studio IDE to generate ActiveX bindings (not for a better word) for my VCL based controls, however it doesn't seem to generate the source needed to create them displayed on the IDE component stands.

Usually on these IDEs (Visual Studio and dBASE Plus) I can just import the ActiveX control and it will show up in the toolbar (their version of the component palette) with their specific icon.

Well, my own ActiveX controls created in Delphi don't work (they import just fine, but don't show up in the pallet / toolbar) and I've searched Google trying to find a solution in the last two weeks.

Having failed unsuccessfully, I decided to ask here:

How do I customize ActiveX controls on the toolbar in Visual Studio (and others)?

Thanks for any tips / suggestions.

EDIT: more information ...

I am trying to do this with both XE2 and XE3 and it failed every time ... however when I do the same (using Wizards) with Delphi 2007 the component icon appears in the Palet / Toolbar of other IDEs as desired ... This means that the problem was introduced some time after Delphi 2007 and is likely the result of some RTL / VCL modification.

+3


source to share


1 answer


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

In addition, changes to RTL and VCL since Delphi 2007 mean that even if you manually generate markup in the source code, your controls will not function correctly when embedded in non-Delphi applications (such as Visual Studio and dBASE Plus). Much of this relates to the VCL presumption of conformance to a VCL-compliant property value Parent

, where updating properties such as ParentFont

would result in an access violation error.



The solution in my case was to create exported ActiveX controls in Delphi 2007 (with its latest version to "play fair" with other ActiveX Control consumers)

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

+1


source







All Articles