Suspend and resume layout

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

Hi,

What exactly does suspend and resume layout do? the MSDN docs say

"Resumes normal layout logic." but what does that mean? what is normal
layout logci? and what does it change by doing this before adding a control
to a form or panel? thanks
 
when suspended, paint messages will be ignored. when layout is resumed, they
will be processed again. used often to avoid control "flickering".

hth,

steve


| Hi,
|
| What exactly does suspend and resume layout do? the MSDN docs say
|
| "Resumes normal layout logic." but what does that mean? what is normal
| layout logci? and what does it change by doing this before adding a
control
| to a form or panel? thanks
|
|
 
* "Brian Henry said:
What exactly does suspend and resume layout do? the MSDN docs say

"Resumes normal layout logic." but what does that mean? what is normal
layout logci? and what does it change by doing this before adding a control
to a form or panel? thanks

<msdn>
The SuspendLayout and ResumeLayout methods are used in tandem to
suppress multiple Layout events while you adjust multiple attributes of
the control. For example, you would typically call the SuspendLayout
method, then set the Size, Location, Anchor, or Dock properties of the
control, and then call the ResumeLayout method to allow the changes to
take effect.
</msdn>
 
Back
Top