Hi All,
Thanks for the hints Sijin.
>>> Make sure you are using Control.Invoke() or control.BeginInvoke()
to marshal the call from your worker thread to your UI thread. <<<
I am, here's the full code of the method that updates the status bar
on the UI thread:
public void updateStatusIndicator(object obj, StatusIndicatorEventArgs
e)
{
if (this.InvokeRequired)
{
object [] pList = { this, e };
this.Invoke(new StatusIndicatorEventHandler(updateStatusIndicator),
pList);
}
else
{
statusBar1.Text = e.msg;
System.Diagnostics.Debug.WriteLine(e.msg);
}
}
>>> Try using Application.DoEvents() <<<
But the UI is on a separate thread which is doing nothing but writing
status messages to the status bar. Where in the above code would it
make sense to add Application.DoEvents()?
Cheers,
Tim.
TimRegan - 13 Oct 2004 20:57 GMT
Hi All,
Sijin Joseph wrote:
>>> Try using Application.DoEvents() <<<
Good call, that fixed it :-)
Thanks,
Tim.