my struct
Structure tridata
Public pts() As Point
Public tcolor As Color
End Structure
----------------------------------
and the loop where it breaks
For x = 0 To x = 5
For i = 0 To 2
triangles(x).pts(i).X = 1 + Int(Rnd() * Form1.ActiveForm.Width)
triangles(x).pts(i).Y = 1 + Int(Rnd() * Form1.ActiveForm.Height)
Next i
Next x
Structure tridata
Public pts() As Point
Public tcolor As Color
End Structure
----------------------------------
and the loop where it breaks
For x = 0 To x = 5
For i = 0 To 2
triangles(x).pts(i).X = 1 + Int(Rnd() * Form1.ActiveForm.Width)
triangles(x).pts(i).Y = 1 + Int(Rnd() * Form1.ActiveForm.Height)
Next i
Next x