移动线 [英] moving lines

查看:113
本文介绍了移动线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.我有一个画框.它使用Paint事件通过线连接.我的画框是可移动的.但是我的问题是我希望线条在表单中移动时跟随并跟随图片框.

请遵循一些准则.:(((

Hi. I have a pictureboxes. It was connected through lines using paint event. My pictureboxes are movable. But my problem is that I want the lines to move and follow picturebox when it is move within the form.

Some guidelines please.. :((

推荐答案

我会尝试通过执行以下任一操作来实现此目标

-对各种DragXXXX事件做出反应,并在得到DragDrop事件时,重新绘制该行.



-对控件的MouseDownMouseMoveMouseUpMove事件的组合做出反应,并在适当时重画该行.
I would try accomplishing this by doing one of the following

- React to the various DragXXXX events, and when you get the DragDrop event, redraw the line.

OR

- React to a combination of MouseDown, MouseMove, MouseUp, and Move events for the control, and when the redraw the line as appropriate.


这篇关于移动线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆