Public Class Form1

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim f As New Font("新細明體", 14)
        Dim graph As Graphics = CreateGraphics()
        '繪製X、Y軸
        graph.DrawLine(Pens.Black, 70, 340, 520, 340)
        graph.DrawLine(Pens.Black, 70, 50, 70, 340)
        '繪製Y軸的文字
        graph.DrawString("銷售量", f, Brushes.Black, 30, 20)
        graph.DrawString("250", f, Brushes.Black, 20, 60)
        graph.DrawString("200", f, Brushes.Black, 20, 115)
        graph.DrawString("150", f, Brushes.Black, 20, 170)
        graph.DrawString("100", f, Brushes.Black, 20, 225)
        graph.DrawString(" 50", f, Brushes.Black, 20, 280)
        '繪製Y軸的文字
        graph.DrawString("第1季", f, Brushes.Black, 90, 350)
        graph.DrawString("第2季", f, Brushes.Black, 190, 350)
        graph.DrawString("第3季", f, Brushes.Black, 290, 350)
        graph.DrawString("第4季", f, Brushes.Black, 390, 350)
        graph.DrawString("季別", f, Brushes.Black, 500, 350)
    End Sub
End Class
