MDI Form : Close all but active

P07r0457

New member
Joined
Sep 13, 2006
Messages
2
Programming Experience
Beginner
I would like to close all mdichildren except the currently active one.

I already have a "close all" function:


VB.NET:
Dim f As Form
For Each f In Me.MdiChildren()
        f.WindowState = FormWindowState.Maximized
Next

But how would I write one that doesn't close the active form?

Thank you in advance.
 
I wish people would actually read the pages they fill in when registering. If you're not using VB 2005 then change your profile so it doesn't say that you are.

Change:
VB.NET:
If childForm IsNot Me.ActiveMdiChild Then
to:
VB.NET:
If Not childForm Is Me.ActiveMdiChild Then
 
Back
Top