Imports System.Windows.Forms

Public Class MDIParent

   

    Private Sub CascadeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub

    Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub

    Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub

    Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.ArrangeIcons)
    End Sub

    Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        ' Close all child forms of the parent.
        For Each ChildForm As Form In Me.MdiChildren
            ChildForm.Close()
        Next
    End Sub

    Private m_ChildFormNumber As Integer

    Private Sub TransactionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub


    Private Sub lblDate_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles lblDate.ItemClicked

    End Sub

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
        timer.Text = TimeOfDay
    End Sub

    Private Sub lblDate_ItemClicked_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles lblDate.ItemClicked

    End Sub

    Private Sub MDIParent_Load_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        lblDate2.Text = Format(Now, "MMMM dd, yyyy")

    End Sub

    Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        lblTime.Text = DateTime.Now.ToLongTimeString()
    End Sub

    Private Sub AddNewCustomerToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddNewCustomerToolStripMenuItem.Click
        Dim newMDIChild As New frmAdminCustomer()
        ' Set the Parent Form of the Child window. 
        newMDIChild.MdiParent = Me
        ' Display the new form. 
        newMDIChild.Show()

    End Sub

    Private Sub QuitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub AddNewProductToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddNewProductToolStripMenuItem.Click
        Dim newMDIChild As New frmAdminProduct()
        newMDIChild.MdiParent = Me
        newMDIChild.Show()
    End Sub

    Private Sub AddNewPaymentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddNewPaymentToolStripMenuItem.Click
        Dim newMDIChild As New frmAdminPayment()
        newMDIChild.MdiParent = Me
        newMDIChild.Show()
    End Sub

    Private Sub CustomerToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomerToolStripMenuItem1.Click
        Dim newMDIChild As New CustomerReport()
        newMDIChild.MdiParent = Me
        newMDIChild.Show()
    End Sub

    Private Sub ProductsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductsToolStripMenuItem.Click
        Dim newMDIChild As New frmProductReport()
        newMDIChild.MdiParent = Me
        newMDIChild.Show()
    End Sub

    Private Sub CustomerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomerToolStripMenuItem.Click
        Dim newMDIChild As New frmNewCustomer()
        ' Set the Parent Form of the Child window. 
        newMDIChild.MdiParent = Me
        ' Display the new form. 
        newMDIChild.Show()
    End Sub

    Private Sub ProductToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductToolStripMenuItem.Click
        Dim newMDIChild As New frmEditProduct()
        ' Set the Parent Form of the Child window. 
        newMDIChild.MdiParent = Me
        ' Display the new form. 
        newMDIChild.Show()
    End Sub
End Class
