Well Phil, the thing you need to do is this:
- Descend your component from TCustomControl (or TWinControl) even
though it is non-visual.
- Register it on the component pallete
- Create a new ActiveX library project
- Create a new ActiveX control based upon your component
- Modify the second to last parameter in the Factory.Create call (in the
initialization section) to OLEMISC_INVISIBLEATRUNTIME
- Save and compile the project
- Select "Run|Register ActiveX Server".
Simple.
BTW, you could have worked this out if you had done a bit more searching
on Google groups.
Phil.
Phil Middlemiss wrote:
I have written a component that implements the event callbacks for the
TUMONZ SDK automation object. It manages creating the CoClass and
hooking up events. It is descended from TControl since there is no
visual aspect to it (it just interacts with the automation object). I
want to wrap this up in such a way that other developers can simply
bring in the control and start using it. I'm quite happy to distribute
a .dcu (hell, even a .pas), but I really want it to be cross-language.
I'm using Delphi 6 Pro.
This is where I'm getting confused with my ActiveX terminology. I
thought I would create a new ActiveX object, but I can't since the
wrapper is a TControl, not a TWinControl.
I want to end up with a control that can be imported into most of the
common languages and plonked on a form for events to be hooked up to.
Should I be able to handcraft an ActiveX object for my wrapper? I
could distribute the type library, but the wrapper does all sorts of
nice things and wraps up connections and events seemlessly.
Any ideas?
Cheers,
Phil.
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi
begin:vcard
fn:Phil Middlemiss
n:Middlemiss;Phil
org:Vision Software, MTS Ltd
email;internet:[EMAIL PROTECTED]
title:Project Leader
tel;work:+64 7 3480001
tel;cell:+64 27 4592648
x-mozilla-html:TRUE
url:http://www.tumonz.co.nz
version:2.1
end:vcard
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi