A
Andrew Ducker
When returning from a multithread callback, I've wrapped my code up
with:
if (MainForm.InvokeRequired)
MainForm.Invoke(CallStart,new object[]{BusinessCaller});
else
CallStart(BusinessCaller);
But even so, a Messagebox.show inside the delegate will sometimes be
modal to MainForm and sometimes happily allow me to switch back and
forth between the two.
If I _always_ do the MainForm.Invoke then it's always modal - but I'm
sure I've read somewhere that this is a bad idea.
Can anyone suggest why InvokeRequired might be coming back with the
wrong value?
Andy D
with:
if (MainForm.InvokeRequired)
MainForm.Invoke(CallStart,new object[]{BusinessCaller});
else
CallStart(BusinessCaller);
But even so, a Messagebox.show inside the delegate will sometimes be
modal to MainForm and sometimes happily allow me to switch back and
forth between the two.
If I _always_ do the MainForm.Invoke then it's always modal - but I'm
sure I've read somewhere that this is a bad idea.
Can anyone suggest why InvokeRequired might be coming back with the
wrong value?
Andy D