-
[RESOLVED] Help with MDI
Guys help please..I have a MDI form and in the parent form I have 2 buttons, Button1 and Button2, when I click the Button1 Child Form1 will be shown and button1 will be disabled and the same with Button2, when I click Button 2 Child Form2 will be shown and Button2 will be disbaled but how will I enable Button1 and close Form1 when the user click on Button2 or vice versa so as only One(1) child form is open/shown.Any help please. Thanks!
-
Re: Help with MDI
You can make a public properties in your MDI Form for your buttons (1 & 2) in order to manipulate the disable/enable property of it, so when you load your form1 it should be like this or something:
Code:
Frmparent parnt;
private void Form1_Load(object sender, EventArgs e)
{
parnt = (Frmparent)MdiParent;
parnt.Btn1.Enabled = false;
}
so when you closed your form1 in the closed event you can easily set "parnt.Btn1.Enabled = true;
hope that helps.
-
Re: Help with MDI