Dim g As Graphics = PictureBox1.CreateGraphics Dim BPen As New Pen(Color.Black, 1) Dim pos(4) As Point Dim x(4) As Integer Dim y(4) As Integer x(0) = 100 : y(0) = 180 x(1) = 380 : y(1) = 180 x(2) = 150 : y(2) = 350 x(3) = 240 : y(3) = 80 x(4) = 330 : y(4) = 350
For i As Integer = 0 To 4 pos(i) = New Point(x(i), y(i)) Next g.DrawPolygon(BPen, pos) BPen.Dispose() g.Dispose()