View Single Post
Old Sep 4th, 2007, 12:59 AM   #3
Jabo
Not a user?
 
Join Date: Sep 2007
Posts: 272
Rep Power: 2 Jabo is on a distinguished road
MDI Form code

Private Sub MDIForm_Load()
    frmLogin.Show
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)
    If MsgBox("Are you sure you want to exit?", vbQuestion + vbYesNo, "Confirm Exit") = vbNo Then
        Cancel = 1
    End If
    Dim frm As Form
    For Each frm In Forms
        Unload frm
    Next
End Sub

Main Form code

Private Sub Form_Load()
    With Me
        .Top = 0
        .Left = 0
        .WindowState = 2
    End With
End Sub

Private Sub mnuExit_Click()
    End
End Sub

Private Sub mnuTapeEntry_Click()
    With Me
        .WindowState = 1
    End With
    frmTapeEntry.Show
End Sub

Child Form code

Private Sub Form_Load()
    With Me
        .Top = 0
        .Left = 0
    End With
End Sub

The main form and child form are both MDI child forms. Both are also visible.

Last edited by Jabo; Sep 4th, 2007 at 1:16 AM.
Jabo is offline   Reply With Quote