M
Mystery Man
I have developed a series of user defined controls. These have been
placed on a variety of different forms.
From within one of these controls, I want to show another dialog
directly to the right of the current form (that contains one of this
particular control).
Therefore, what I am after is the position of the form that hosts a
control from the control itself. I realise that I can do the
following:
this.Parent.Parent...Location;
However, as this control is on a variety of forms, there is no
guarantee how many parents objects I need to retrieve in order to get
to the parent form.
Is there a way to work out which parent is the form itself or is there
a better way of doing this?
placed on a variety of different forms.
From within one of these controls, I want to show another dialog
directly to the right of the current form (that contains one of this
particular control).
Therefore, what I am after is the position of the form that hosts a
control from the control itself. I realise that I can do the
following:
this.Parent.Parent...Location;
However, as this control is on a variety of forms, there is no
guarantee how many parents objects I need to retrieve in order to get
to the parent form.
Is there a way to work out which parent is the form itself or is there
a better way of doing this?