Atul
Wed Oct 19 05:37:20 CDT 2005
I don't think there is a straight-forward way. One way is to generate
serialization code using CodeDOM for your component similar to the following
:
this.MyComponent1.HostForm = this;
For this, you have to implement your own serialize inheriting from
CodeComSerializer and apply it to your component using
DesignerSerializerAttribute
----------------
-Atul, Sky Software
http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Robert Magnusson" <RobertMagnusson@discussions.microsoft.com> wrote in
message news:2A6FE67D-9EA6-4220-AF21-8E712D0679C8@microsoft.com...
> Hi all,
>
> I have a component (originally developed as a class) that handles the
> processing of window docking. When implemented as a class, I simply
> passed
> the form (which implements ContainerControl) into the constructor. I
> expected that, in implementing a Component I would be able to determine
> the
> form on which the component was added without having to have it passed in
> as
> a parameter in the constructor (or as a writable property).
>
> Have I missed something (probably!)? How would you go about determining
> the
> form on which a component resides?
>
> Regards,
>
> RM