private void btnStartAgain_Click(object sender, EventArgs e) { GlobalVariables.PatientName = ""; GlobalVariables.RefByDoc = ""; GlobalVariables.Age = 0; GlobalVariables.InvReq = ""; GlobalVariables.InvDone = ""; GlobalVariables.VisitNo = 0; DeleteImages(); this.Hide(); cap = new frmCaptureImage(); //cap.Activate(); cap.MdiParent = this.MdiParent; cap.ClientSize = new System.Drawing.Size(2000, 800); cap.WindowState = FormWindowState.Maximized; cap.FormBorderStyle = FormBorderStyle.None; cap.ControlBox = false; cap.MaximizeBox = false; cap.MinimizeBox = false; cap.ShowIcon = false; cap.FormClosed += Frmcaptureimage_FormClosed; cap.Dock = DockStyle.Fill; cap.Show(); cap.ControlCap(); cap.axVideoCap1.Start(); }
private void ShowNewForm(object sender, EventArgs e) { if (frmcaptureimage == null) { frmcaptureimage = new frmCaptureImage(); frmcaptureimage.MdiParent = this; frmcaptureimage.ClientSize = new System.Drawing.Size(2000, 800); this.WindowState = FormWindowState.Maximized; frmcaptureimage.FormBorderStyle = FormBorderStyle.None; frmcaptureimage.ControlBox = false; frmcaptureimage.MaximizeBox = false; frmcaptureimage.MinimizeBox = false; frmcaptureimage.ShowIcon = false; frmcaptureimage.FormClosed += Frmcaptureimage_FormClosed;; frmcaptureimage.Dock = DockStyle.Fill; frmcaptureimage.Show(); } else { frmcaptureimage.Activate(); } }