Solved

connect two images on the form by line in run time

Posted on 2004-04-28
5
181 Views
Last Modified: 2010-04-24
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
Comment
Question by:mahmoudatiya
  • 2
5 Comments
 
LVL 2

Expert Comment

by:Jeffr0
ID: 10938202
GDI+ is the .Net toolkit for this.

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

Accepted Solution

by:
Jeffr0 earned 50 total points
ID: 10938225
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question