Private Sub Command1_Click() Dim x As Integer Dim y As Double Dim startX As Integer Dim startY As Double Dim nextX As Integer Dim nextY As Double startX = 0 startY = 0 For x = 0 To 100 y = x * x + 2 * x nextX = x nextY = Form1.Height - y Form1.Line (startX,startY)-(nextX,nextY) startX = nextX startY = nextY Next End Sub 我在窗体上画线,没在picturebox画,改成picturebox就行了