vb.net作业,画坐标轴及标尺,画y=sin(x)曲线
发布网友
发布时间:2024-08-21 22:53
我来回答
共1个回答
热心网友
时间:2024-09-07 14:24
Private Sub mainfrm_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim pt(200) As PointF
Dim a As Integer
For a = 0 To 200
pt(a).X = 50 * a
pt(a).Y = 200 - 50 * Math.Sin(a - 1)
Next
Me.CreateGraphics.DrawLine(Pens.Blue, 0, 200, 800, 200)
Me.CreateGraphics.DrawLine(Pens.Blue, 50, 0, 50, 600)
Me.CreateGraphics.DrawCurve(Pens.Blue, pt)
End Sub