本帖最后由 SummerQ 于 2024-5-25 15:22 编辑
// Winform .NET Framework 4.8
问题1:
- HOperatorSet.DispObj(HImage, HWindow);
- HDrawingObject hDrawingObject = new HDrawingObject();
- hDrawingObject.CreateDrawingObjectRectangle2(100, 100, 0, 30, 10);
- HWindow.AttachDrawingObjectToWindow(hDrawingObject);
复制代码- private void HWindowControl_HMouseDown(object sender, HMouseEventArgs e)
- {
- HWindowControl.Cursor = Cursors.Hand;
- }
复制代码 鼠标单击图片不松开,会自动触发HWindowControl的MouseLeave事件(表现:Cursor从hand自动转为arrow),此时未触发HMouseUp事件
但是双击图片不松开,就正常了
问题2:
- HOperatorSet.DispObj(HImage, HWindow);
- HDrawingObject hDrawingObject = new HDrawingObject();
- hDrawingObject.CreateDrawingObjectRectangle2(100, 100, 0, 30, 10);
- HWindow.AttachDrawingObjectToWindow(hDrawingObject);
- hDrawingObject.OnSelect(CallbackOnSelect);//注册事件
- private void CallbackOnSelect(HDrawingObject drawid, HWindow window, string type)
- {
- hDrawingObject.SetDrawingObjectParams("color", "green");
- }
复制代码
为什么单击ROI进行拖拽时不会调用该回调函数,需要双击ROI,颜色才发生变化?
|