Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports System.IO
Public Class Form2

    Public con As New SqlConnection
    Public cmd As New SqlCommand
    Public DS As New DataSet
    Public DA As New SqlDataAdapter


    Private Sub ConsultationFeeToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConsultationFeeToolStripMenuItem1.Click

        Dim frm As New Form9
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub RadiologicalExaminationFeeToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadiologicalExaminationFeeToolStripMenuItem1.Click
        Dim frm As New Form6
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub LaboratoryExaminationFeeToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LaboratoryExaminationFeeToolStripMenuItem1.Click
        Dim frm As New Form8
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub PharmacyToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PharmacyToolStripMenuItem1.Click
        Dim frm As New Form10
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub DeathBirthMedicalCertificateFeeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeathBirthMedicalCertificateFeeToolStripMenuItem.Click
        Dim frm As New Form11
        frm.Show()
        frm.MdiParent = Me
    End Sub



    Private Sub CreateAccountToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateAccountToolStripMenuItem.Click
        Dim frm As New Form7
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        tolmenu.Enabled = False
        Dim frm As New Form1
        frm.Show()
        frm.MdiParent = Me
        Form1.txtuser.Focus()
        ' Get the mdiclient area control to paint the background for us
        For Each c As Control In Me.Controls
            If TypeOf c Is MdiClient Then
                AddHandler c.Paint, AddressOf myMdiControlPaint
                AddHandler c.SizeChanged, AddressOf myMdiControlResize
                Exit For
            End If
        Next

    End Sub
    Private Sub myMdiControlPaint(ByVal sender As Object, _
  ByVal e As System.Windows.Forms.PaintEventArgs)
        e.Graphics.DrawImage(Me.PictureBox1.Image, 0, 0, Me.Width, Me.Height)
    End Sub

    Private Sub myMdiControlResize(ByVal sender As Object, _
      ByVal e As System.EventArgs)
        CType(sender, MdiClient).Invalidate()
    End Sub






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



    Private Sub AdmissionFeeToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdmissionFeeToolStripMenuItem1.Click
        Dim frm As New Form12
        frm.Show()
        frm.MdiParent = Me
    End Sub



    Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
        Dim form3 As New Form3
        form3.Show()
        form3.MdiParent = Me
    End Sub




    Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton5.Click
        Dim frm As New PharmacyProduct
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton6.Click
        Dim frm As New frmpatien
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem1.Click
        Dim frm As New Form13
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click
        Dim frm As New Frmroom
        frm.Show()
        frm.MdiParent = Me
    End Sub


    Private Sub PharmacyProductToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PharmacyProductToolStripMenuItem.Click
        Dim frm As New frm10report
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ReportAdmissionFeeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportAdmissionFeeToolStripMenuItem.Click
        Dim frm As New frm12
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ReportRoomToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportRoomToolStripMenuItem.Click
        Dim frm As New frm13
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ReportPatientConsultationInformationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportPatientConsultationInformationToolStripMenuItem.Click
        Dim frm As New frm3
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ReportConsultationFeeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportConsultationFeeToolStripMenuItem.Click
        Dim frm As New frm9
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub RadiologicalExaminationFeeReportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadiologicalExaminationFeeReportToolStripMenuItem.Click
        Dim frm As New frm6
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ReportLaboratoryExaminationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportLaboratoryExaminationToolStripMenuItem.Click
        Dim frm As New frm8
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ReportUserAccountToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportUserAccountToolStripMenuItem.Click
        Dim frm As New frm7
        frm.Show()
        frm.MdiParent = Me
    End Sub

    Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
        If MsgBox("Are you sure you want to log-out?", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Exit") = MsgBoxResult.Yes Then
            Me.Hide()
            Me.Show()
      
            tolmenu.Enabled = False
            Dim frm As New Form1
            frm.Show()
            frm.MdiParent = Me
            Form1.txtuser.Focus()

        End If
    End Sub

    Private Sub ToolStripButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click
        End
    End Sub
End Class