阅读:595回复:4
HALCON error #5191: Invalid value for window parameter in operator disp_obj
第一次写的C#联合halcon的程序,程序可以正常运行,但是一旦最小化就会报错:HalconDotNet.HOperatorException:“HALCON error #5191: Invalid value for window parameter in operator disp_obj”
找了好久发现: GetImageSize(hWindowControlRun, ho_HoImagesource, ref hv_Height1, ref hv_Width1, ref hv_Height2, ref hv_Width2); HOperatorSet.SetPart(hv_ExpDefaultWinHandle, hv_Height1, hv_Width1, hv_Height2, hv_Width2); 最小化时, GetImageSize得到的参数数值异常,导致显示不了图片。 最后直接把显示改成固定大小: HOperatorSet.SetPart(hv_ExpDefaultWinHandle, 0, 0, 2747, 3982); |
|
最新打赏:0人 |
板凳#
发布于:2021-05-14 18:43
|
|
地板#
发布于:2021-05-14 22:07
窗口最小化后,我也遇到过很多问题,比如dump窗口也会出错。
|
|
4楼#
发布于:2022-05-23 10:07
我也是遇到同样问题 要是有解决办法 艾特我一下
|
|