首页上一页 1 下一页尾页 2 条记录 1/1页
忙给我详细讲下
发表在VB答疑区
2010-09-25
是否精华
是
否
版块置顶:
是
否
帮忙给我详细讲下下面代码中Y = 0.5 - 7 * X / 180这个式子,为什么要这样算,依据是什么0.5、7 、X / 180,这三个数分别代表了什么?麻烦讲详细点,我要给学生教谢谢。
Option Explicit
Dim X As Single
Dim Y As Single
Private Sub rainbow()
If X > 10 Then X = 10
[font color=#FF0000]Y = 0.5 - 7 * X / 180[/font]
Circle (7700, 7500), 8100, RGB(255, 0, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 7400), 8100, RGB(0, 0, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 7300), 8100, RGB(0, 255, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 7200), 8100, RGB(0, 255, 0), Y * 3.14, 3.14, 0.8
Circle (7700, 7100), 8100, RGB(255, 255, 0), Y * 3.14, 3.14, 0.8
Circle (7700, 7000), 8100, RGB(255, 0, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 6900), 8100, RGB(0, 255, 255), Y * 3.14, 3.14, 0.8
End Sub
Private Sub Form_Load()
Label1.Font = "@楷体"
Label1.FontSize = 28
End Sub
Private Sub Label1_Click()
End
End Sub
Private Sub Timer1_Timer()
Call rainbow
X = X + 0.1
End Sub
Option Explicit
Dim X As Single
Dim Y As Single
Private Sub rainbow()
If X > 10 Then X = 10
[font color=#FF0000]Y = 0.5 - 7 * X / 180[/font]
Circle (7700, 7500), 8100, RGB(255, 0, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 7400), 8100, RGB(0, 0, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 7300), 8100, RGB(0, 255, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 7200), 8100, RGB(0, 255, 0), Y * 3.14, 3.14, 0.8
Circle (7700, 7100), 8100, RGB(255, 255, 0), Y * 3.14, 3.14, 0.8
Circle (7700, 7000), 8100, RGB(255, 0, 255), Y * 3.14, 3.14, 0.8
Circle (7700, 6900), 8100, RGB(0, 255, 255), Y * 3.14, 3.14, 0.8
End Sub
Private Sub Form_Load()
Label1.Font = "@楷体"
Label1.FontSize = 28
End Sub
Private Sub Label1_Click()
End
End Sub
Private Sub Timer1_Timer()
Call rainbow
X = X + 0.1
End Sub