求大神帮忙解释一下这个程序每一句都是什么意思 万分感谢! 10
OptionExplicitPrivateL(7)AsIntegerPrivateJd(7)AsDoublePrivatezjAsDoublePrivateSubForm...
Option Explicit
Private L(7) As Integer
Private Jd(7) As Double
Private zj As Double
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 7
Me.Circle (4000, 4000), i * 500
Shape1(i - 1).Top = 4000 - 90
Shape1(i - 1).Left = 4000 + i * 500 - 90
L(i) = i * 500
Jd(i) = 0
HScroll1(i - 1).Max = 1000
HScroll1(i - 1).Min = 100
HScroll1(i - 1).Value = 100
HScroll1(i - 1).SmallChange = 5
HScroll1(i - 1).LargeChange = 100
Next i
zj = 10 / 180 * 3.141592654
End Sub
Private Sub HScroll1_Change(Index As Integer)
Timer1(Index).Interval = 1100 - HScroll1(Index).Value
End Sub
Private Sub Timer1_Timer(Index As Integer)
Jd(Index + 1) = Jd(Index + 1) + zj
Shape1(Index).Left = 4000 + L(Index + 1) * Cos(Jd(Index + 1)) - 90
Shape1(Index).Top = 4000 - L(Index + 1) * Sin(Jd(Index + 1)) - 90
End Sub 展开
Private L(7) As Integer
Private Jd(7) As Double
Private zj As Double
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 7
Me.Circle (4000, 4000), i * 500
Shape1(i - 1).Top = 4000 - 90
Shape1(i - 1).Left = 4000 + i * 500 - 90
L(i) = i * 500
Jd(i) = 0
HScroll1(i - 1).Max = 1000
HScroll1(i - 1).Min = 100
HScroll1(i - 1).Value = 100
HScroll1(i - 1).SmallChange = 5
HScroll1(i - 1).LargeChange = 100
Next i
zj = 10 / 180 * 3.141592654
End Sub
Private Sub HScroll1_Change(Index As Integer)
Timer1(Index).Interval = 1100 - HScroll1(Index).Value
End Sub
Private Sub Timer1_Timer(Index As Integer)
Jd(Index + 1) = Jd(Index + 1) + zj
Shape1(Index).Left = 4000 + L(Index + 1) * Cos(Jd(Index + 1)) - 90
Shape1(Index).Top = 4000 - L(Index + 1) * Sin(Jd(Index + 1)) - 90
End Sub 展开
1个回答
展开全部
可以加分吗?
Option Explicit '使用变量必须先定义
Private L(7) As Integer '定义数组L
Private Jd(7) As Double '数组JD
Private zj As Double '定义zj 为双精度型
Private Sub Form_Load() '窗体载入事件
Dim i As Integer '定义 i 为整数
For i = 1 To 7 '循环开始
Me.Circle (4000, 4000), i * 500 '以下几句 是根据
Shape1(i - 1).Top = 4000 - 90 '变量 i 值
Shape1(i - 1).Left = 4000 + i * 500 - 90 '在画图形
L(i) = i * 500
Jd(i) = 0 '以下几句 是设置 滚动(状态)条 属性
HScroll1(i - 1).Max = 1000
HScroll1(i - 1).Min = 100
HScroll1(i - 1).Value = 100
HScroll1(i - 1).SmallChange = 5
HScroll1(i - 1).LargeChange = 100
Next i
zj = 10 / 180 * 3.141592654 'zj 赋值
End Sub
Private Sub HScroll1_Change(Index As Integer)
'当 滚动条 值改变时
Timer1(Index).Interval = 1100 - HScroll1(Index).Value
'设置 绘图 时间 间隔
End Sub
Private Sub Timer1_Timer(Index As Integer)
'以下都是绘图的代码
Jd(Index + 1) = Jd(Index + 1) + zj
Shape1(Index).Left = 4000 + L(Index + 1) * Cos(Jd(Index + 1)) - 90
Shape1(Index).Top = 4000 - L(Index + 1) * Sin(Jd(Index + 1)) - 90
End Sub
更多追问追答
追问
可以!可不可以麻烦详细一点 是分感谢
追答
亲~已经很详细了。这个代码提交要审核很久的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询