Hi,
I m having 12 forms in my application. I want to display a message box asking the user to close the existing opened child form before opening other.
I had tried the following the code:
TypeScript
Form curfrm;
String a = " Please Close the other open windows";
private void admissionForm1ToolStripMenuItem_Click(object sender, EventArgs e)
{
adfrm1 af1 = new adfrm1(null);
if (curfrm != null)
{
MessageBox.Show(a);
return;
}
else
{
curfrm = af1;
af1.MdiParent = this;
af1.Show();
}This doesn't allow me to open the other forms after closing the child form.
Thanks.

VulpesRank #55 · 29.2K reputationPosted Mar 1, 2012, 11:56 PM EST