Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Clickable Line Control
Line control is not hard to make, except maybe for DrawMode property, but Click Event will have to take some modifications.
vbgen's idea can work in cases when Line1.x1=Line1.x2 or Line1.y1=Line1.y2, bu the problem comes when user wants to draw a line which is not horizontal or vertical, but bias. So, when clicked anywhere inside rectangle it will raise an UserControl_Click Event (not just on line).
In this case you would have to check if it is clicked on line, or near it (lets say 1 pixel as tolerancy), which also shouldnt be hard.
But, what intrigues me is, how can be made line control which will have aperiance on the form in design mode same as microsoft; line control has??
____________________________
If you find the answer helpful, please mark this topic as solved.
|