Saturday, January 8, 2011

close specific child form with specified name in windows application


            foreach (Form aForm in this.MdiChildren)
            {
                 if (aForm.Name == "Form1")
                 {
                     aForm.Close();
                     break;
                 }
             }

No comments:

Post a Comment