title: How to prevent the redraw of a managed winform on programmatic resize?
body: <p>I have a .net 4.0 winforms project where I need to programmatically set the bounds (aka size) of a window (System.Windows.Forms.Form) and add/remove controls to/from it, at the same time, without visible flicker. The form is not user-resizable, the only place where its size is changed is the this.Bounds = foo / this.DesktopBounds = foo / ... call.</p>
  
  <p>I already read about preventing flicker by sending WM_SETREDRAW using p/invoke, and about SuspendRedraw/SuspendLayout and friends. I still see flicker happening, and nailed the prob down to:</p>
  
  <p>Windows redraws the form on setting its bounds/size, even if redraw was disabled.</p>
  
  <p>I guess this is caused not by the form itself, but by the window manager somehow?</p>
  
  <p>So - is there a way to absolutely prevent redrawing anything, in any circumstances, and then re-enabling redraw and refresh manually afterwards? Kind of "freeze window and display a snapshot", change stuff, and "replace snapshot with updated window (incl. position and size) in 1 go" ?</p>
  
  <p>Thanks, cheers,
    Tim</p>