Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

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
0
mahmoudatiya
Asked:
mahmoudatiya
  • 2
1 Solution
 
Jeffr0Commented:
GDI+ is the .Net toolkit for this.

You'll need a Pen object to draw it.  (System.Drawing.Pen)
0
 
Jeffr0Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now