connect two images on the form by line in run time

i am implementing RF simulator and i am in the GUI phase i want to know how i can connect two images (which represent two elements) by line in run time such that user can make wire connections in the circuit
thanks
mahmoudatiyaAsked:
Who is Participating?
 
Jeffr0Connect With a Mentor Commented:
Put this code in the Paint event of your form for an example:

        Dim bit As Bitmap = New Bitmap(Me.Width, Me.Height)
        Dim g As Graphics = Graphics.FromImage(bit)
        Dim myPen As Pen = New Pen (Color.Blue, 3)

        Me.CreateGraphics.DrawLine(myPen, 0, 0, Me.Width, Me.Height)
0
 
Jeffr0Commented:
GDI+ is the .Net toolkit for this.

You'll need a Pen object to draw it.  (System.Drawing.Pen)
0
All Courses

From novice to tech pro — start learning today.