public frmNewCertificate(frmMain mainFrm)
 {
     InitializeComponent();
     this.mainFrm = mainFrm;
     this.companyData = mainFrm.GetCompanyData();
     comboBox1.Text = "0";
     try
     {
         _capture = new Capture();
         _capture.ImageGrabbed += ProcessFrame;
     }
     catch (NullReferenceException excpt)
     {
         MessageBox.Show(excpt.Message);
     }
     try
     {
         _capture1 = new Capture(1);
         _capture1.ImageGrabbed += ProcessFrame1;
     }
     catch (NullReferenceException excpt)
     {
         //MessageBox.Show(excpt.Message);
     }
 }
 public frmCertificatePreview(frmMain mainFrm)
 {
     InitializeComponent();
     this.mainFrm = mainFrm;
 }