Jaruzel.com

Draw a Line on a Form


'Draw line on form
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)