Hello...
I want to draw three straight lines on a form.
Can you tell me if the following code is correct:
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim Line1 As System.Drawing.Graphics
Dim PenLine As New System.Drawing.Pen(System.Drawing.Color.Black)
Line1 = Me.CreateGraphics
Line1.DrawLine(PenLine, 0, 129, 529, 129)
Line1.DrawLine(PenLine, 0, 180, 529, 180)
Line1.DrawLine(PenLine, 0, 190, 529, 190)
End Sub
Can I use only one variable (Line1) to draw three straight lines?
Is this the right way to do it?