I placed an MDI form in my application . If i select an option from file menu as New i will have a child form loaded.
My code is as follows to show the child form
private void ShowNewForm(object sender, EventArgs e)
{
foreach (Form frm in Application.OpenForms)
{
if (frm.Text == "Main")
{
IsOpen = true;
frm.Focus();
break;
}
}
if (IsOpen == false)
{
Form childForm = new FrmMain();
childForm.MdiParent = this;
childForm.Show();
}
}
Now what i need is when the child form is in active state i would like to have my MDI inactive until and unless the user closes the child form.
Generally for forms we will write
frm.showDialog()
So how to resolve this