salam
in code ye mosalas ba hal rasm mikoneh
faghat nazar bedin
needed 2lines , 2 timer interavel 1000
Dim Y, Z, P, Q
Private Sub Form_Load()
Timer1.Enabled = False
Y = 0
Z = 0
Q = 11
P = 11
Line1.X1 = 0
Line1.X2 = 0
Line1.Y1 = 0
Line1.Y2 = 10
Line2.X1 = 0
Line2.X2 = 10
Line2.Y1 = 0
Line2.Y2 = 0
End Sub
Private Sub Timer1_Timer()
Me.Scale (-10, 10)-(10, -10)
Dim k, j, h As Integer
Randomize Timer
k = Rnd * 255: j = Rnd * 255: k = Rnd * 255On Error GoTo a
Static x
Y = Y - 0.5
x = x + 0.5
Me.Line (x, -10)-(10, -Y), RGB(k, j, h)
Static V
Z = Z - 0.5
V = V + 0.5
Me.Line (Z, -10)-(10, -V), RGB(k, j, h)
If Z = -10 Then Timer1.Enabled = False
a:Exit SubEnd Sub
Private Sub Timer2_Timer()
Dim k, j, h As Integer
Randomize Timer
k = Rnd * 255: j = Rnd * 255: k = Rnd * 255
Static u
u = u + 0.5
P = P - 0.5
Me.Line (u, 0)-(0, P), RGB(k, j, h)
If P = 1 Then Timer2.Enabled = False: Timer1.Enabled = True
Static w
Q = Q - 0.5
w = w + 0.5
Me.Line (Q, 0)-(0, w), RGB(k, j, h)
If Q = 1 Then Timer2.Enabled = False: Timer1.Enabled = True
End Sub
in code ye mosalas ba hal rasm mikoneh
faghat nazar bedin
needed 2lines , 2 timer interavel 1000
Dim Y, Z, P, Q
Private Sub Form_Load()
Timer1.Enabled = False
Y = 0
Z = 0
Q = 11
P = 11
Line1.X1 = 0
Line1.X2 = 0
Line1.Y1 = 0
Line1.Y2 = 10
Line2.X1 = 0
Line2.X2 = 10
Line2.Y1 = 0
Line2.Y2 = 0
End Sub
Private Sub Timer1_Timer()
Me.Scale (-10, 10)-(10, -10)
Dim k, j, h As Integer
Randomize Timer
k = Rnd * 255: j = Rnd * 255: k = Rnd * 255On Error GoTo a
Static x
Y = Y - 0.5
x = x + 0.5
Me.Line (x, -10)-(10, -Y), RGB(k, j, h)
Static V
Z = Z - 0.5
V = V + 0.5
Me.Line (Z, -10)-(10, -V), RGB(k, j, h)
If Z = -10 Then Timer1.Enabled = False
a:Exit SubEnd Sub
Private Sub Timer2_Timer()
Dim k, j, h As Integer
Randomize Timer
k = Rnd * 255: j = Rnd * 255: k = Rnd * 255
Static u
u = u + 0.5
P = P - 0.5
Me.Line (u, 0)-(0, P), RGB(k, j, h)
If P = 1 Then Timer2.Enabled = False: Timer1.Enabled = True
Static w
Q = Q - 0.5
w = w + 0.5
Me.Line (Q, 0)-(0, w), RGB(k, j, h)
If Q = 1 Then Timer2.Enabled = False: Timer1.Enabled = True
End Sub
