Suspend and resume layout

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
 
S

steve

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
|
|
 
H

Herfried K. Wagner [MVP]

* "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>
 
B

Brian Henry

thanks, it'd be nice if MSDN would of went into more depth on the subject..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top