Exemplo n.º 1
0
        private void prescriptionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAddPrescription cForm = new frmAddPrescription();

            cForm.MdiParent     = this;
            cForm.StartPosition = FormStartPosition.CenterScreen;
            cForm.Show();
            cForm.Focus();
        }
 private void btnAddPrescription_Click(object sender, EventArgs e)
 {
     try
     {
         //opens add prescription form
         frmAddPrescription cForm = new frmAddPrescription();
         cForm.MdiParent     = this.MdiParent;
         cForm.StartPosition = FormStartPosition.CenterScreen;
         cForm.Show();
         cForm.Focus();
     }
     catch (Exception ex)
     {
         string myException = ex.ToString();
         MessageBox.Show(myException, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }