标签:class except ret ras .sh exception button 图片加载 先后
//必须先加载图片,然后执行
hWndControl.setGUICompRangeX( new int[]{ XTrackBar.Minimum,
XTrackBar.Maximum},
XTrackBar.Value );
hWndControl.setGUICompRangeY( new int[]{ YTrackBar.Minimum,
YTrackBar.Maximum},
YTrackBar.Maximum-YTrackBar.Value);
private void SmartWindow1Form_Load(object sender, System.EventArgs e) { hWndControl = new HWndCtrl(viewPort); Init(); } private void Init() { String fileName = @"E:\Halcon\patras"; HImage image; try { image = new HImage(fileName); } catch(HOperatorException) { MessageBox.Show("Problem occured while reading file!", "SmartWindow1", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } hWndControl.addIconicVar(image); hWndControl.repaint(); hWndControl.setGUICompRangeX( new int[]{ XTrackBar.Minimum, XTrackBar.Maximum}, XTrackBar.Value ); hWndControl.setGUICompRangeY( new int[]{ YTrackBar.Minimum, YTrackBar.Maximum}, YTrackBar.Maximum-YTrackBar.Value); }
标签:class except ret ras .sh exception button 图片加载 先后
原文地址:https://www.cnblogs.com/qq1151219115/p/9293325.html