Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleArrange MDI child forms
KeywordsMDI, child form, subform
CategoriesTips and Tricks, Controls
 
Use the MDI form's Arrange method passing it a parameter to indicate how you want the child forms arranged.

 
Private Sub mnuWindowArrangeIcons_Click()
    Me.Arrange vbArrangeIcons
End Sub

Private Sub mnuWindowCascade_Click()
    Me.Arrange vbCascade
End Sub

Private Sub mnuWindowTileHorizontal_Click()
    Me.Arrange vbTileHorizontal
End Sub

Private Sub mnuWindowTileVertical_Click()
    Me.Arrange vbTileVertical
End Sub
 
Provide other functions for all child forms by looping through the Forms collection.
 
Private Sub mnuWindowCloseAll_Click()
Dim frm As Form

    For Each frm In Forms
        If Not (frm Is Me) Then
            Unload frm
        End If
    Next frm
End Sub

Private Sub mnuWindowMinimizeAll_Click()
Dim frm As Form

    For Each frm In Forms
        If Not (frm Is Me) Then
            frm.WindowState = vbMinimized
        End If
    Next frm
End Sub

Private Sub mnuWindowRestoreAll_Click()
Dim frm As Form

    For Each frm In Forms
        If Not (frm Is Me) Then
            frm.WindowState = vbNormal
        End If
    Next frm
End Sub

Private Sub mnuWindowNewWindow_Click()
Dim frm As New Form1

    frm.Show
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated