Friday 17 May 2013

How check if the form is already open

using System.Windows.Forms;

FormCollection fc = Application.OpenForms;
For (int FrmCount = 0; FrmCount < fc.Count; FrmCount++)
{
    Form frm = fc[FrmCount];
    if (frm.Name == "<Form Name>")
    {
       MessageBox.Show(" Child Forms Open");
    }
}

No comments:

Post a Comment