M
Markus
Hello,
I am trying to create a custom control which inherits from
System.Windows.Forms.Form and can be used as a base class
for an application. So far so good.
I am also writing custom components which inherit from
System.ComponentModel.Component.
What I would like to know is if there is any way for my
custom form class can be made aware of these components?
The problem is that when my form class is instantiated at
design time via "Add Inherited Form" and I drop a
component on this form, the designer automagically extends
the base class by adding an IContainer
called "components". The component is then added to this
collection.
Is there any reasonably simple way to get these components
to act like controls and drop themselves into a nice
collection of my choosing? I also need the reverse link -
from component to form i.e. something comparable to the
Parent property of controls.
Thanks for all help.
Sincerely,
Markus
PS - for more background info, I started a thread on Aug.
19th '03 re: "How-to create user control replacing..."
I am trying to create a custom control which inherits from
System.Windows.Forms.Form and can be used as a base class
for an application. So far so good.
I am also writing custom components which inherit from
System.ComponentModel.Component.
What I would like to know is if there is any way for my
custom form class can be made aware of these components?
The problem is that when my form class is instantiated at
design time via "Add Inherited Form" and I drop a
component on this form, the designer automagically extends
the base class by adding an IContainer
called "components". The component is then added to this
collection.
Is there any reasonably simple way to get these components
to act like controls and drop themselves into a nice
collection of my choosing? I also need the reverse link -
from component to form i.e. something comparable to the
Parent property of controls.
Thanks for all help.
Sincerely,
Markus
PS - for more background info, I started a thread on Aug.
19th '03 re: "How-to create user control replacing..."