Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

SuspendLayout and ResumeLayout

I had received some very workable advice about the OnResize method from Christopher Wells and others in the following post.

http://discuss.fogcreek.com/dotnetquestions/default.asp?cmd=show&ixPost=3470&ixReplies=6

I just came across what seems a better solution, so I wanted to share it.


protected override void OnResize(EventArgs e)
{
    this.SuspendLayout();

    // lots of drawing code....

    this.ResumeLayout();
}

This avoids the need for a temporary boolean variable.

Thanks everyone for the continuing help.

Charles Reich
Sunday, October 24, 2004

*  Recent Topics

*  Fog Creek Home