| >time returns back to my program.The window created by my
| >program is
| >not refreshed immediately to the state before switching but I must
| >wait until my program writes to that window.
| 
| The Window class has the Activate() event. Maybe some other 
| control has 
| something similar that you can use. Otherwise maybe the Timer 
| control can 
| help you, but that might ivolve performance issues. Time 
| things and find out.

Ladislav,

we had this posting twice before. Maybe my reply escaped you - or maybe what
I suggested didn't work. But from my understanding, the window can only
refresh when the respective, system-generated Paint messages get processed.
As long as one of your event handlers is running and does not return, the
messages just sit there and wait. If this is the cause of the problem, the
Activate sub won't help, because the Activate message, too, would not get
processed. If you haven't already, put
Win32::GUI::DoEvents ();
in the sub that runs so long, at a place inside the loop, so that it gets
called often. It does not do anything if there are no messages waiting, so I
guess it's not much of a performance issue.

As for your other question - how to let the user know the program's still
alive - that's what progress bars do a good job at. Or a textfield with a
counter. If, as you say, the window refreshes as soon as you write to your
log field, then writing a countdown might solve both issues.

Hope that helps,
Harald

Reply via email to