"Brian Newman" <b2******@or.blm.gov> schrieb:
In past languages (I'm thinking of FoxPro here and possibly VB 2.0 or
so), you could "freeze" the visual display of a form while you update
it in code, then "reveal" the updated form. This kept the display
from flashing or bogging down while it drew every individual thing one
at a time and made it look neat and clean to the user.
On the one hand, you can prevent .NET's /layouting/ engine from working by
calling the form's 'SuspendLayout' and 'ResumeLayout' methods.
On the other hand, you can prevent /drawing/ of a specific window using
p/invoke:
Preventing controls from redrawing
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=disableredrawing>
Some controls, like listboxes and comboboxes provide 'BeginUpdate' and
'EndUpdate' methods to prevent the control from updating its UI while items
are added/removed/changed.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>