Suspend Form Repaint?

D

Dave Veeneman

Is there a simple way to suspend a form repaint? I have several things I
need to do with a form, and I want to suspend repainting it until the last
item is done. Thanks.
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Hi Dave,
There was such a question couple of days ago posted by mevar.
The subject was "Disabling Forms Redrawing". You can check Google for the
whole thread.

Anyways, here is my advise I gave back then:

" There is not managed solution that works in all of the cases.
Some controls like ListBox, ListView, TreeView and ComboBox have their own
way to stop updating the control. This can be done using the method pair
BeginUpdate/EndUpdate.

However there is no method that works with all of the controls.

I said there is no managed solution because you can send WM_SETREDRAW
message to the controls window and in this way stop/resume painting the
control."
 

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