Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.. :((
Posted

1 solution

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.
 
Share this answer
 
v2
Comments
yummy02 20-Jan-11 23:14pm    
but how can i do that? i my mouse event, there are only codes available in moving picturebox, not lines..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900