Ejemplo n.º 1
0
 private void OrientationModelDlg_Load(object sender, EventArgs e)
 {
     HOperatorSet.OpenWindow(0, 0, pictureBox1.Width, pictureBox1.Height, pictureBox1.Handle, "visible", "", out WindowsHandle);
     HalconCommonFunc.SetPart(WindowsHandle, 1920, 1200, pictureBox1.Width, pictureBox1.Height);
     //Image.Dispose();
     //HOperatorSet.GenEmptyObj(out Image);
 }
Ejemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     HOperatorSet.OpenWindow(0, 0, pictureBox1.Width, pictureBox1.Height, pictureBox1.Handle, "visible", "", out PublicData.WindowsHandle);
     HalconCommonFunc.SetPart(PublicData.WindowsHandle, 1920, 1200, pictureBox1.Width, pictureBox1.Height);
     PublicData.settingMessage = IniManager.ReadFromIni <SettingMessage>(Application.StartupPath + "\\Config" + "\\SettingMessage.Jason");
     HkCameraCltr.EnumDevices();
     PublicData.OpenCrame = PublicData.hkCameraCltr.OpenDevices(PublicData.settingMessage.CaremerName);
     if (0 == PublicData.OpenCrame)
     {
         MessageBox.Show("相机连接成功");
     }
     else
     {
         MessageBox.Show("相机连接失败");
     }
 }
 private void OtherLocationDlg_Load(object sender, EventArgs e)
 {
     HOperatorSet.OpenWindow(0, 0, pictureBox1.Width, pictureBox1.Height, pictureBox1.Handle, "visible", "", out WindowsHandle);
     HalconCommonFunc.SetPart(WindowsHandle, 1920, 1200, pictureBox1.Width, pictureBox1.Height);
     HalconCommonFunc.DisplayImage(PublicData.createNewCheckModel.ModelImage, WindowsHandle);
 }