Drawing a triangle

  • Thread starter Thread starter Chiragc
  • Start date Start date
C

Chiragc

Guest
Hi everyone!
Can anyone tell me how to draw a triangle in vb.net?
I am using the drawPolygon method.
I want to use variables such as Xpos, and Ypos, instead of static variables.

any ideas?
 
Code:
    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        Dim Points(2) As Point

        Points(0) = New Point(100, 100)
        Points(1) = New Point(150, 100)
        Points(2) = New Point(100, 150)
        e.Graphics.DrawPolygon(Pens.Red, Points)
    End Sub
 

Similar threads

Back
Top