private void FrmIndex_Load(object sender, EventArgs e) { try { Init(); Himg._Instimagtwain(this.ImgView, this.Handle, 0); Himg._Rectang(true); //Writeini.Fileini = Path.Combine(Application.StartupPath, "Csmkeyval.ini"); Getsqlkey(); pub = new Pubcls(); Startocr(); } catch (Exception ex) { MessageBox.Show("初始化失败请重新加载" + ex.ToString()); Himg.Dispose(); } }
private void FrmImgOcr_Load(object sender, EventArgs e) { try { Himg._Instimagtwain(this.ImgView, this.Handle, 1); Himg._Rectang(true); } catch (Exception ex) { MessageBox.Show("初始化失败请重新加载" + ex.ToString()); Himg.Dispose(); } }