0

maybe this question has already been asked here - at least many similar questions have been -, but I did not find a solution that works for my situation. So please don't blame me too much if I missed a question...

I have the following situation: I have a form with many controls on it - a tab control with seven tabs - a table layout panel with six (3x2) cells on each cell - a PictureBox - some labels - a table layout panel with 40 cells (5x8) in each cell of the table layout panel, there's a label with some text

when resizing the form, I can use the ResizeBegin and ResizeEnd events to prevent a continous recalculating and redrawing of the form during resizing it using the mouse. But when the resizing as been finished or when the form is being maximized, all the controls are resized (they are anchored to automatically resize to fit the form client area) and start flickering terribly for several seconds - until they all have the correct size and position.

Is there a way to eliminate this flickering? Best would be some mechanism to suspend the layout on the begin of the repaint-after-resize routine and to continue the layout after that routine has finished. But I'm not sure if I can access that routine as it seems to be some mechanism which the framework has full control over.

Or does anyone of you know how to get this done?

Best, Tom

TomS
  • 467
  • 9
  • 25
  • 1
    http://stackoverflow.com/a/3718648/17034 – Hans Passant Feb 19 '17 at 17:30
  • I already had double buffering enabled, but I did not know about the mechanism your link points to. That works like a charm! Thank you! Please add this as an answer so that I can mark it as the correct one (just in case someone else is also looking for the same and does not find the post you referred to... – TomS Feb 19 '17 at 17:46

0 Answers0