1个回答
展开全部
Const π As Double = 3.1415926
Dim k
Private Sub Command1_Click()
For x = -4 * π To 4 * π Step 0.001
PSet (x, Cos(x)), vbBlue
Next x
End Sub
Private Sub Command2_Click()
Timer1.Interval = 1
End Sub
Private Sub Command3_Click()
Timer1.Interval = 0
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
Scale (-4 * π, 1)-(4 * π, -1)
k = 喊大-4 * π
PSet (0, 穗毕0)
Me.FillColor = 郑族竖vbRed
Me.FillStyle = 0
End Sub
Private Sub Timer1_Timer()
Cls
For x = -4 * π To 4 * π Step 0.005
PSet (x, Cos(x)), vbBlue
Next x
Circle (k, Cos(k)), 0.25, vbRed
k = k + 0.04
If k >= 4 * π Then k = -4 * π
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询