7

So the transparent background problem is solved. Now, every time I show the form (or have to have it repainted), I get a lot of flickering. Is there any way I can not update the screen until the paint event is complete, or any other way to stop the 1/2 second of flickering and flashing while all the objects are being painted?

ANSWER: Double buffering is the way to go. I was already double buffering on the control, but it has to be set on the form. I though double buffering only worked when you were subclassing OnPaint yourself.

Community
  • 1
  • 1
user29140
  • 187
  • 2
  • 9

3 Answers3

10

Did you try setting the DoubleBuffered property for the form?

Community
  • 1
  • 1
Gulzar Nazim
  • 51,744
  • 26
  • 128
  • 170
5

Double Buffering might help, another thing you might want to try is:

SuspendLayout();

dostuffhere...

ResumeLayout();

schmoopy
  • 6,419
  • 11
  • 54
  • 89
  • 2
    DoubleBuffered _increases_ resource requirements, but is more likely to be effective. Suspend/ResumeLayout() _reduce_ resource requirements, but are less likely to be effective. – Joel Coehoorn Oct 21 '08 at 00:07
2

Set the DoubleBuffered Property on the form.

Kyle Trauberman
  • 25,414
  • 13
  • 85
  • 121