Click here to Skip to main content
16,004,761 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a form of size 500,500 and it has a rectangle of size 800,800 i can drag the rectangle,now i want to draw a line relative to rectangle instead of form .i.e i want to draw a line a point 600 to 700. how is possible.
Thanks
Posted

1 solution

Well, some simple common sense might apply here. If your rectangle has been dragged to 100, 50, and you want to start a line from the corner of the rectangle, how do you think you'd work out where to start ? My guess is, start at 100, 50, the position of the rectangle.
 
Share this answer
 
Comments
Nasir M@hmood 4-May-10 5:24am    
Thanks Christian for replay, but i want to know is there any built in method like we can draw image in destination rectangle, otherwise i have to recalculate the line coordinates each time when i drag the rectangle.

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