Hi, Steven
if process runs in same thread, for example, UI, you have to allow message
pump to route appropriate messages including Paint to corresponding
controls. This means that somewhere in the process code you must have
DoEvents call. Even this won't guarantee timely updates. It is generally
recommended to perform long running processes in separate threads or
asynchronously to keep UI thread responsive.
You might want to check for example
http://msdn.microsoft.com/msdnmag/is...Multithreading for
recommended approaches.
HTH
Alex
"Steven Blair" <st**********@btinternet.com> wrote in message
news:er******************@tk2msftngp13.phx.gbl...
Hi,
I have a function made up of several processes. After each process I
want to write the status of the provess out to a Listbox:
void MyFunc()
{
if( DoSomething1() )
{
lsOutput.Items.Add("Success 1");
}
if( DoSomething2() )
{
lsOutput.Items.Add("Success 2");
}
//And so on
}
The problem is, none of the details are displayed to the Listbox until
all the processing is finished.
Can anyone help me out?
Regards,
Steven
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!