Saturday 3 August 2013

Find window forms attached by MDI Parent in C#

Try this code to close perticular open form or all open form.......

foreach (Form form in Application.OpenForms)
                            {
                                if (form.Name == "Login")
                                {
                                    form.Close();
                                }
                             // /* to close all open form */
                             //  form .Close();
                            }

No comments:

Post a Comment