Creating an edit control in C #?
Unfortunately, creating a standalone "connector" is difficult. This involves creating a control with a transparent background .
You will then handle the rendering code required to draw your styled connector (however you want to do this, a simple line, or something more complex). If you don't know how to draw, find the Graphics class and how it works with the Bitmap class.
You can also display small squares at the end of the connector, which will be used as handles for dragging the connector (to connect to other components). You will need to perform stroke testing to determine which square the custom mouse is on. and Hit testing again when they release the mouse over another component (to hold the component to which the connector is attached).
You can also add the ability to select additional points on the line that split the line into two or more line segments. This will allow you to create connections that are not straightforward. This would again enable line matching testing and make the mouse code even more complex.
You will need to make sure each connector control sits above each component by changing the z-order and connectors and components attributes.
Another option is to create a container control that contains your components. The container control will respond to all mouse events and just draw connections to itself (of course, it should also store connection information). This method differs in that the connectors are not controls, they are simply drawn directly onto the container.
Finally, if you're looking for a way to automatically lay out your components, here's a starting point.
a source to share