Click here to Skip to main content
15,892,809 members
Articles / Programming Languages / C#

Repainting WinForms windows safely inside a processing loop (safe DoEvents)

Rate me:
Please Sign up or sign in to vote.
5.00/5 (4 votes)
21 Dec 2012CPOL1 min read 30.1K   607   7  
This example illustrates the correct use of Application.DoEvents() in order to allow a window to repaint (or handle the desired messages) while its thread is busy doing heavy processing.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Spain Spain
Programming since the times of good old Spectrum.
Windows developer (from C++/COM to C# now).

Comments and Discussions