Link to home
Start Free TrialLog in
Avatar of kevinful
kevinful

asked on

Arranging Minimized Child Forms

How can I arrange my child forms on a MDIForm so that they are stacked vertically on each other?  I've tried the arrange method but that doesn't seem to be the answer.
ASKER CERTIFIED SOLUTION
Avatar of supunr
supunr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aeklund
aeklund

Try this:

Private Sub ArrangeVert(ByRef mdi As MDIForm)
  On Error Resume Next
  Dim i, x, y As Integer
  i = mdi.Height / Forms.Count
  y = 0

  Debug.Print mdi.Top
  For x = 0 To Forms.Count - 1
    If Not Forms(x).MDIChild Then
    Else
      Forms(x).Top = y
      y = y + i
      Forms(x).Left = 0
      Forms(x).Height = i
      Forms(x).Width = mdi.ScaleWidth
    End If
  Next
End Sub
replace "PLForm" with the name of the MDI parent name.
Avatar of kevinful

ASKER

Thanks all!