Sunday, September 11, 2016

Close all child forms in Parent in Visual Studio 2012 - 2015

In purpose of form controlling, close all child form is to manage current active form to topmost. This action will work when a lot of forms are already opened. This script is small but can be work as magic to help out your biggest project.

Code Example:
 Private Sub CloseAll()
        For Each aform As Form In Me.MdiChildren
            aform.Close()
            'aform.Dispose()
        Next
    End Sub



Download Source for free: Close All Active Form
Notice: This script is working find in Visual Studio 2012 or above

0 comments :

Post a Comment