阅读:675回复: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
|
|