im getting this error:
An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll
Additional information: Collection was modified; enumeration operation may not execute.
i have no controls on the forum. i have overriden the onPaint method and the OnPaintBackground method. in my own paint method im drawing a simulation to the screen. i have bots, to which i pass a graphics object and draw them. each time they move, i invalidate the form and redraw. when they start moving too much, i get the error above. any ideas?
An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll
Additional information: Collection was modified; enumeration operation may not execute.
i have no controls on the forum. i have overriden the onPaint method and the OnPaintBackground method. in my own paint method im drawing a simulation to the screen. i have bots, to which i pass a graphics object and draw them. each time they move, i invalidate the form and redraw. when they start moving too much, i get the error above. any ideas?