HOLA!!!
Estaba aburrido, y como nadie contesta el reto hice esto:
'armen un form con:
' 2 shapes
' 2 lines
' 1 timer
' y denle a f5
Private Sub Form_Load()
Me.ScaleMode = vbPixels
Me.ScaleHeight = 600
Me.ScaleWidth = 800
Shape1.Top = Me.ScaleHeight / 2 - 200
Shape2.Top = Me.ScaleHeight / 2 - 200
Shape1.Left = Me.ScaleWidth / 2 - 150
Shape2.Left = Me.ScaleWidth / 2 + 150
Shape1.Shape = 2
Shape2.Shape = 2
Shape1.Width = 150
Shape2.Width = 150
Shape1.Height = 300
Shape2.Height = 300
Line1.BorderColor = &HFF&
Line2.BorderColor = &HFF&
Line1.X1 = Shape1.Left + Shape1.Width / 2
Line1.Y1 = Shape1.Top + Shape1.Height / 2
Line2.X1 = Shape2.Left + Shape2.Width / 2
Line2.Y1 = Shape2.Top + Shape2.Height / 2
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
Randomize
neg = 1
If Rnd() * 2 > 1 Then neg = -1
Line1.X2 = Shape1.Left + Shape1.Width / 2 + Rnd() * 300 * neg
neg = 1
If Rnd() * 2 > 1 Then neg = -1
Line1.Y2 = Shape1.Top + Shape1.Height / 2 + Rnd() * 300 * neg
neg = 1
If Rnd() * 2 > 1 Then neg = -1
Line2.X2 = Shape2.Left + Shape2.Width / 2 + Rnd() * 300 * neg
neg = 1
If Rnd() * 2 > 1 Then neg = -1
Line2.Y2 = Shape2.Top + Shape2.Height / 2 + Rnd() * 300 * neg
End Sub
GRACIAS POR LEER!!!