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

Lots of updates in a window.

P: n/a
UJ
I am going to be doing lots of stuff to my window that is currently being
displayed to the user. (Moving controls around, hiding some, making some
visible, ....) Is there any way I can turn off the refresh while this is
going on? I don't want the user to see the stuff moving around.

TIA - Jeff.
Mar 28 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try doing it in the same way the Windows Forms code generator does it:

- Before changing your layout, make the following function call:

this.SuspendLayout(); // Where this refers to the form
// you are updating

- After doing all changes required, use the following function:

this.ResumeLayout(false); // Also this refers to your form

*** Sent via Developersdex http://www.developersdex.com ***
Mar 28 '06 #2

P: n/a
UJ
Perfect. I knew there had to be a way.

Thanks!

"Wessam Fathi" <de************@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP14.phx.gbl...
Try doing it in the same way the Windows Forms code generator does it:

- Before changing your layout, make the following function call:

this.SuspendLayout(); // Where this refers to the form
// you are updating

- After doing all changes required, use the following function:

this.ResumeLayout(false); // Also this refers to your form

*** Sent via Developersdex http://www.developersdex.com ***

Mar 28 '06 #3

P: n/a
Hi,

"UJ" <fr**@nowhere.com> wrote in message
news:eS**************@TK2MSFTNGP09.phx.gbl...
Perfect. I knew there had to be a way.

Thanks!

Take a look at the "Windows Form Designer generated code" and you will see
how it does it.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Mar 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.