Public Class Form1

    Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
        Dim g As Graphics = e.Graphics
        Dim pen As New Pen(Color.Black, 3) '创建黑色钢笔
        '创建线条各段的点的数组
        Dim points As Point() = {New Point(10, 10), New Point(10, 100), New Point(200, 50), New Point(250, 120)}
        '将已连接的线段绘制到屏幕
        g.DrawLines(pen, points)
    End Sub

End Class
