By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,422 Members | 1,414 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,422 IT Pros & Developers. It's quick & easy.

SuspendLayout, ResumeLayout() not called

P: n/a
I was just about to wrap some code for filling a DataViewGrid in
//Grid filling code
when I got worried t hat something might go wrong in the filling code and
ResumeLayout() would never get called. I considered putting ResumeLayout in a
finally block, but thought I would see what happens if I leave it out
completely. I tested the code with SuspendLayout and no ResumeLayout and I
don't see any problem at all!

What happens if ResumeLayout is not called? I assume it is being forced by
default somewhere. Would it be wiser to put all SuspendLayouted actions in
try blocks with ResumeLayout in finally blocks?

Jul 11 '08 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I suspect it would get interesting if it was anchored / docked and you
start resizing the form. But best approach is finally. This is more
important for the BeginUpdate/EndUpdate type pairs, where rendering is

Jul 11 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.