Курсовая работа: Программирование в Бейсике
For z = 0 To (Combo1.ListCount - 1)
For i = 0 To (arBusCount(z) - 1)
If z <> 0 Then
a = i
For j = 0 To (z - 1)
i = i + arBusCount(j)
Next j
End If
If arStayPast(z, i) = (arStayCount(z) - 1) Then arStayEdit(z, i)= -1
If arStayPast(z, i) = 0 Then arStayEdit(z, i) = 1
If Val(arStayAbsciss(z, arStayPast(z, i))) > Val(arStayAbsciss(z, arStayPast(z, i) + arStayEdit(z, i))) _
Then arCoordEdit(z, i) = -1
If Val(arStayAbsciss(z, arStayPast(z, i))) < Val(arStayAbsciss(z, arStayPast(z, i) + arStayEdit(z, i))) _
Then arCoordEdit(z, i) = 1
If Val(arStayAbsciss(z, arStayPast(z, i))) = Val(arStayAbsciss(z, arStayPast(z, i) + arStayEdit(z, i))) _
Then arCoordEdit(z, i) = 0
k(z, i) = (Val(arStayOrdinata(z, arStayPast(z, i))) - Val(arStayOrdinata(z, arStayPast(z, i) + arStayEdit(z, i)))) / _
(Val(arStayAbsciss(z, arStayPast(z, i))) - Val(arStayAbsciss(z, arStayPast(z, i) + arStayEdit(z, i))))
b(z, i) = Val(arStayOrdinata(z, arStayPast(z, i))) - k(z, i) * Val(arStayAbsciss(z, arStayPast(z, i)))
Dim c As Single
c = Cos(Atn(k(z, i)))
x0(z, i) = x0(z, i) + c * 2 * arCoordEdit(z, i)
y0(z, i) = k(z, i) * x0(z, i) + b(z, i)
Image1(i).Move x0(z, i) - Image1(i).Width / 2, y0(z, i) - Me.Image1(i).Height / 2
If arCoordEdit(z, i) = 1 Then
If x0(z, i) >= Val(arStayAbsciss(z, arStayPast(z, i) + arStayEdit(z, i))) _
Then arStayPast(z, i) = arStayPast(z, i) + arStayEdit(z, i)
End If
If arCoordEdit(z, i) = -1 Then