Suspend Painting in C# Form

  • Thread starter Thread starter orekinbck
  • Start date Start date
O

orekinbck

Hi There

I want to stop all paiting on a form while I do some processing.

SuspendLayout and ResumeLayout does not seem to work, and after digging
around, I found that I needed to make an interop call to
LockWindowUpdate.

Is there a better way ?

Thanks
Bill
 
Only the ListView and TreeView controls have the BeginUpdate/EndUpdate
methods. For others, you have to resort to P/Invoke.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
 
I want to stop all paiting on a form while I do some processing.

SuspendLayout and ResumeLayout does not seem to work, and after digging
around, I found that I needed to make an interop call to
LockWindowUpdate.

P/invoke with 'SendMessage' + 'WM_SETREDRAW' ;-).
 

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

Back
Top