You can use the Graphics.DrawLine method. For example:
Dim myPen As New System.Drawing.Pen(System.Drawing.Color.Red)
Dim formGraphics as System.Drawing.Graphics
formGraphics = Me.CreateGraphics()
formGraphics.DrawLine(myPen, 0, 0, 200, 200)
myPen.Dispose()
formGraphics.Dispose()
For more you can take a look in help under "graphics, examples [Visual
Basic]" or "graphics, what's changed"
Elena Arzac
--------------------
Content-Class: urn:content-classes:message
From: "brian" <br****@lbrspec.com>
Sender: "brian" <br****@lbrspec.com>
Subject: Line on a VB.NET form
Date: Fri, 22 Aug 2003 13:15:05 -0700
Lines: 7
Message-ID: <02****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcNo6hNheCpWLVIPTqWp6RHjjlDi1g==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:129786
NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
X-Tomcat-NG: microsoft.public.dotnet.languages.vb
This is driving my crazy! I can not find the option to
draw a line in VB.NET. In VB6 there was a line control
drag and drop. Can someone help please?
I am assumming it is hidden somewhere!
Thanks