It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

HELP: Form went blank once lost focus

Moderator: dafunkymunky

HELP: Form went blank once lost focus

Postby tjfan on Tue Feb 13, 2007 4:27 am

I have a simple program whose main form is an SDI. I have a couple of progress bars on the form plus a timer. They show the progress of a lengthy process (a lot of disk i/o). The form displays everything correctly except that once it lost focus (e.g., I switch to another window then come back), the entire form went blank (after a few seconds). It never recovers until the entire process is finished.

I've trapped the Paint() event handler of the form and it turns out that once the form goes blank, the Paint() event (as well as all other event handlers) is no longer invoked. Note that the process (disk i/o's etc.) is still running, just all GUI of the form becomes inactive until all process is done and the form comes back to wait for the user input.

Any ideas?
tjfan
 
Posts: 2
Joined: Tue Feb 13, 2007 4:13 am
Location: Los Angeles

Postby tjfan on Wed Feb 14, 2007 1:01 am

Never mind. I forgot to place DoEvents(). :lol:
tjfan
 
Posts: 2
Joined: Tue Feb 13, 2007 4:13 am
Location: Los Angeles


Who is online

Users browsing this forum: No registered users and 12 guests