i have a main form that has a button, when click a subform1 will open. in subform1 theres another button that will open subform2 in main form..i have this code in subform1.
{
profilefrm prf = null;
foreach (Form existingForm in this.MdiChildren)
{
prf = existingForm as profilefrm;
if (prf != null)
break;
}
if (prf == null)
{
prf = new profilefrm();
prf.MdiParent = this;
prf.Show();
prf.Location = new Point(101, 90);
this.Text = "MyPersonalDietaryGuidance-MY PDG";
}
else
prf.Activate();
this.Text = "MyPersonalDietaryGuidance-MY PDG";
}
then got this error...
Form that was specified to be the MdiParent for this form is not an MdiContainer.
Parameter name: value
main form is a container...property is set---> isMDIcontainer=true;
my goal is open subform via other subform i main form,, THANKS