Dim x1 As Integer
Dim x2 As Integer
Dim y1 As Integer
Dim y2 As Integer
Dim grosor As Integer
Private Sub Command1_Click()
Line1.x1 = x1 + Rnd() * 1000
Line1.x2 = x2 + Rnd() * 1000
Line1.y1 = y1 + Rnd() * 1000
Line1.y2 = y2 + Rnd() * 1000
Line1.BorderColor = RGB(Rnd() * 255, Rnd() * 255, Rnd() * 255)
Line1.BorderWidth = Rnd() * 100 + 1
Slider1.Value = Line1.BorderWidth
If Shape1.Left > Screen.Width() Then
Shape1.Left = 0
Else
Shape1.Left = Shape1.Left + Rnd() * 100
End If
If Shape1.Top > Screen.Height() Then
Shape1.Top = 0
Else
Shape1.Top = Shape1.Top + Rnd() * 100
End If
Shape1.BackColor = RGB(Rnd() * 255, Rnd() * 255, Rnd * 255)
Shape1.Shape = Rnd() * 5
End Sub
Private Sub Form_Load()
x1 = Line1.x1
x2 = Line1.x2
y1 = Line1.y1
y2 = Line1.y2
End Sub
Private Sub Slider1_Click()
Line1.BorderWidth = Slider1.Value
End Sub