Refresh Window

appletonrd

Newcomer
Joined
Dec 6, 2005
Messages
4
Hi ppl

I have created an app that does quite a bit of processing.
My trouble is that when I press the process button, the window will often go blank (especially if you change to another window, and get then back to this app), and the objects don't get refreshed.

I tried using this.Refresh() which they say "forces the control to invalidate its client area and immediately redraw itself and any child controls", but it didn't work all that well. At least not as I expected...

Is there a simple way to force the window to refresh from time to time, say every x cycles in the main loop?

thanks
Ricardo
 
Another possibility would be to do processing on another thread so that the GUI thread doesn't get tied up (search MSDN for info about the Thread class).
 
Back
Top