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:
<pre lang="cs">
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();
}</pre>
This doesn't allow me to open the other forms after closing the child form.
Thanks.