Reputation: 465
When I has pictureboxes that move relatively fast at different speeds through the form on a relatively good computer it runs alright, but when I go onto a slightly worse computer, it lags if there are more then three pictureboxes moving at fast speeds on the form.Im not sure if this has anything to do with doublebuffering, could someone explain to mewhat doublebuffering is? And how I could fix my problem? The picturebox isn't a picture, just has its backcolor set to blue/red/green.
Upvotes: 0
Views: 1527
Reputation: 1418
Just expanding on the above answer: if you think double-buffering is for you, do this:
In Form_Load
, add the line DoubleBuffered=True
.
Upvotes: 0
Reputation: 2477
Double Buffering is explained very well here at Wikipedia.
Animated PictureBoxes can hardly be optimized, as they where never intended to be used for that.
Can you elaborate on what kind of animation you are trying to accomplish? Maybe a different approach, blitting into one PictureBox or even DirectX are more suitable for your task.
Upvotes: 1