移动线 [英] moving lines
本文介绍了移动线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨.我有一个画框.它使用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
事件时,重新绘制该行.
或
-对控件的MouseDown
,MouseMove
,MouseUp
和Move
事件的组合做出反应,并在适当时重画该行.
I would try accomplishing this by doing one of the following
- React to the variousDragXXXX
events, and when you get theDragDrop
event, redraw the line.
OR
- React to a combination ofMouseDown
,MouseMove
,MouseUp
, andMove
events for the control, and when the redraw the line as appropriate.
这篇关于移动线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文