Parent Property

Hi

I have a class BaseForm which is inherited from Windows.Forms.
Now the users of this class will derive their application forms from BaseForm instead of the usual Windows.Form
After this I have my own components - both visual and non visual.
Since some components are non-visual they will not have the drag and drop functionality of visual controls.
But i need a way to set the Parent property of these controls to my BaseForm (or rather the client applications Form which will be inherited from BaseForm).
For e.g. in Delphi, the Owner property of the control is passed as a parameter in the constructor.
Hence any control - visual or nonvisual has access to the Owner. Is there something similar in C#.

[733 byte] By [codefund.com] at [2007-12-16]
# 1
This is a problem with components. But, you can code around this yourself. Add a property of type Form and set it to be the parent in the designer. For an example of this, see the RegionBuilder class in my <a href="http://windowsforms.net/ControlGallery/ControlDetail.aspx?Control=219&tabindex=9">RegionMaster controls</a>.

- mike

codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Designer...