Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

No duplicate forms in MDI Parent

//This will ensure that no duplicate copies of a child form is created in an //MDI_Parent

            //"Display" is the form name
            foreach (Form childForm in this.MdiChildren)
            {
                if (childForm.GetType() == typeof(Display))
                {
                    childForm.Focus();
                    return;
                }
            }
            Display frmDisplay = new Display();
            frmDisplay.MdiParent = this;
            frmDisplay.Show();
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS