Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MDI child forms
Message
 
To
31/12/2002 09:34:43
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00736934
Message ID:
00736969
Views:
7
Hi Jim,

You can use the MdiChildren property of the Parent Container Form. Here is some sample code:
MyChildForm childForm
foreach (Form frm in this.MdiChildren)
{
    if (frm is MyChildForm)
    {
        // found it
        childForm = (MyChildForm)frm;
        childForm.Close();
        break;
    }
}
>All,
>
> I have a MDI application with a menu. One of the options on the menu is Window. A sub option of the Window menu is close which will close the Active child form. If there is not a child form I get a nullreference exception error. What is the best way to test for a child window?
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform