Results 1 to 5 of 5

Thread: MDI Forms

  1. #1

    Thread Starter
    Addicted Member smh's Avatar
    Join Date
    Oct 2000
    Location
    South Dakota, USA
    Posts
    249
    Does anyone know of any code which would allow me to horizontally tile 4 MDI Child forms in the parent form?

    smh
    Normal is boring...

    smh

  2. #2
    Guest
    Use the Arrange method
    Code:
    MDIForm1.Arrange vbTileHorizontal

  3. #3
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    Code:
    Dim chldWin(3) As New chldForm1
    Dim chldHeight As Integer
    
    Private Sub mnuTileH_Click()
        chldHeight = Int(Me.ScaleHeight / 4)
        
        For x = 0 To 3
            chldWin(x).Top = chldHeight * x
            chldWin(x).Width = Me.ScaleWidth
            chldWin(x).Left = 0
            chldWin(x).Height = chldHeight
            chldWin(x).Show
        Next x
    End Sub
    There ya go, hope this helps. If it's actually ScaleWidth to do a horizontal, just replace the above code with this:

    Code:
    Dim chldWin(3) As New chldForm1
    Dim chldWidth As Integer
    
    Private Sub mnuTileH_Click()
        chldWidth = Int(Me.ScaleWidth / 4)
        
        For X = 0 To 3
            chldWin(x).Top = 0
            chldWin(x).Width = chldWidth
            chldWin(x).Left = chldWidth * X
            chldWin(x).Height = Me.ScaleHeight
            chldWin(x).Show
        Next X
    End Sub
    Hope this helps.
    -Excalibur

  4. #4
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    Woo, well, that's pretty spiffy, Megatron. I didn't know about that command (hurriedly takes some notes)
    -Excalibur

  5. #5

    Thread Starter
    Addicted Member smh's Avatar
    Join Date
    Oct 2000
    Location
    South Dakota, USA
    Posts
    249

    thanks

    thanks...worked great!

    smh
    Normal is boring...

    smh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width