title: Double buffering with Panel
body: <p>Double buffering the whole form can be done by setting the value of the "AllPaintingInWmPaint", "UserPaint" and "DoubleBuffer" ControlStyles to "true" (<code>this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true)</code>).</p>
  
  <p>But this can't happen with a System.Windows.Forms.Panel because the class doesn't allow me to do so. I have found one solution: <a href="http://bytes.com/topic/c-sharp/answers/267635-double-buffering-panel-control" rel="nofollow noreferrer">http://bytes.com/topic/c-sharp/answers/267635-double-buffering-panel-control</a> . I have also tried this: <a href="https://stackoverflow.com/questions/3718380/winforms-double-buffering">Winforms Double Buffering</a> . It's laggy, even when it's used on a small drawing, I have some custom resources that I'm using in the form and other things because of which I won't turn the whole form into one drawing. And the second one seems to cause problems. Are there other ways to do that?</p>
  
  <p>I'm asking this because I don't want the drawing on the panel to flash all the time when the form is being resized. If there is a way to get rid of the flashing without double buffering, I'll be happy to know.</p>