Double-buffering the form will not double-buffer the child controls too.
You will be able to reduce the problem by not calling the default
OnPaintBackground because that surely paints everything battleship grey
before you get to paint your own background.
Transparent controls are notoriously troublesome because they rely on
forcing the parent window to repaint itself in their graphics surfaces.
Try not to use PictureBox if you can help it. I can't be double buffered.
You can derive from it or even create your own from scratch and enable it's
own buffering.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"Khadim" <as***********@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
Friends,
The problem I am facing is that when my form resizes or is loaded
(invalidated), the background image of my form (which i have drawn
through GDI+ and also by putting a picture box on the form) is redrawn
several times which cause it to flicker a lot.
setstyles(controlstyles.doublebuffer, true ) didn't solved my problem.
I have 8 panels, 2 listviews and a few text boxes.
All panels are transparent so the portions of background image can be
shown.
Desperate need of assistance....
Thanks in advance...
Regards,