Moving Multiple Picture Boxes - lag?
On my form I have a control array of 239 picture boxes NOT being moved. Then I create 5 picture boxes of a new control array and move them with a timer with the interval set to 10. It moves fine, but when I load another 5 picture boxes totaling 10 the game starts to lag by the images starting to move slower then set to. The more I load and more the slower it keeps getting.
I am increasing the .top of all of the picture boxes by 25 every time the timer ticks with a 10 interval.
How can I prevent this 'lag'?
Re: Moving Multiple Picture Boxes - lag?
Not sure this helps your situation but in a program I have that moves a large array of labels I toggle the .visible property before and after the move and it helped speed up the moving.
Code:
For i = 0 To Lbl.Count -1
Lbl(i).Visible = False
Lbl(i).Top = Lbl(i).Top - 1
Lbl(i).Visible = True
Next i
1 Attachment(s)
Re: Moving Multiple Picture Boxes - lag?
here is something i have for you, in this attachment