how to draw diagram lines between controls?

ketansnadar

New member
Joined
Nov 19, 2007
Messages
3
Programming Experience
1-3
Hi folks .. I am having a problem in vb.net can anyone help me..
I am having three controls(button) say A and B and C in the left of the form and I am creating it in runtime and I am assigning it three values 1 and 2 and 3 respectively..Now on the right side i am creating another control named Result and it is a group box with label control in it..
I wish to make a new control like a pipe or a line control as you might have seen in sql server diagrams which will connect the A,B,C control like a link to the Groupbox so that when i am clicking a button OK in the form..The answer should be given as 6 in the label in thr gropupbox..Can any one help me out how to make the line control .. i am in urgent requirement of this...I would be very happy if any one helpms me ou by this..Thanks again..
 
Create a UserControl that do nothing but draw a line within its bounds. Draw line with e.Graphics.DrawLine method in Paint event of the control. The control could use a property that set the direction the line is to be drawn.
 
One of the VB Power Packs includes a line control. That would only be a straight line though. If you want something jointed that only draws in the horizontal and verticl then you'd have to draw your own. I'd be inclined to add custom logic to draw on the form itself though, rather than creating a UserControl.
 
Back
Top