Public Class Form1
    Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
        Dim gobj As Graphics = Me.CreateGraphics()
        '定义点数组parray1
        Dim parray1 As Point() = {New Point(20, 20), New Point(20, 80), New Point(100, 80)}
        gobj.DrawPolygon(Pens.Blue, parray1)
        '定义点数组parray2
        Dim parray2 As Point() = {New Point(150, 10), New Point(120, 50), New Point(150, 90), New Point(200, 90), New Point(230, 50), New Point(200, 10)}
        gobj.FillPolygon(Brushes.Red, parray2)
    End Sub

End Class
