Board index » delphi » Converting Non-Visual VCL Component to ActiveX

Converting Non-Visual VCL Component to ActiveX


2003-09-17 09:12:21 PM
delphi121
Hi,
I need to convert my non-visual VCL Component (inherited from TComponent) to
an ActiveX Component. How can this be done?
I tried creating through the New-Create-ActiveX Control procedure...But that
requires that the Control be derived from TWinControl.
What are the ways by which I can do this conversion?
Thanks,
 
 

Re:Converting Non-Visual VCL Component to ActiveX

newsgroups.borland.com writes:
Quote
I tried creating through the New-Create-ActiveX Control procedure...But that
requires that the Control be derived from TWinControl.
What are the ways by which I can do this conversion?
There are two ways:
1) (the easy way) conditionally descend the component as TWinControl's
descendant,register it in palette and then use the above procedure
2) (hard way) implement all necessary interfaces by hand.
The problem with the easy way is size. VCL adds ~300-350Kb to your
ActiveX so the smallest size you get would be ~400Kb.
--
Eugene Mayevski
EldoS Corp., CTO
Networking and security solutions, custom development services
www.eldos.com
 

Re:Converting Non-Visual VCL Component to ActiveX

Hi,
Thanks for the info.
Quote
1) (the easy way) conditionally descend the component as TWinControl's
descendant,register it in palette and then use the above procedure
What do u mean by "conditionally descend"? My existing component descends
from TComponent. Now, if I make it descend from TWinControl, I assume I'll
be getting something that is visible at runtime also when placed on the
form! My component should look like any other non-visual component with an
icon. How can I achieve this if I derive from TWinControl?
Quote
2) (hard way) implement all necessary interfaces by hand.
Do u know of any good tutorial which deals with exclusively Non-Visual
Component Creation for ActiveX?
Thanks,
"Eugene Mayevski" <XXXX@XXXXX.COM>writes
Quote
newsgroups.borland.com writes:

>I tried creating through the New-Create-ActiveX Control procedure...But
that
>requires that the Control be derived from TWinControl.
>What are the ways by which I can do this conversion?

There are two ways:

1) (the easy way) conditionally descend the component as TWinControl's
descendant,register it in palette and then use the above procedure
2) (hard way) implement all necessary interfaces by hand.

The problem with the easy way is size. VCL adds ~300-350Kb to your
ActiveX so the smallest size you get would be ~400Kb.

--
Eugene Mayevski
EldoS Corp., CTO
Networking and security solutions, custom development services
www.eldos.com