MysticEarth
MysticEarth

Reputation: 2806

C# Panel.BackgroundImage + transparent Controls = flickering?

I've got a Panel with a jpg BackgroundImage (with BackgroundImageLayout = Stretch). On the panel it's Controls I add some PictureBoxes with a PNG which has transparent borders. Displaying this doesn't give any problems, but moving (the boxes are draggable) the PictureBoxes does.

The result is that the moving PictureBox "disturbs" the BackgroundImage and slows down performance. The faster I drag the box, the more it disturbs the BackgroundImage, and vice versa.

How to solve this problem?

Upvotes: 0

Views: 5679

Answers (1)

Daniel Henry
Daniel Henry

Reputation: 856

Check this out: http://msdn.microsoft.com/en-us/library/b367a457.aspx

All you need to do is turn double-buffering on using the property on the Form.

Upvotes: 1

Related Questions