E
Eric Dan
Hi,
Sometimes while handling an event in the UI thread I need to call some
action but I don't want it to be invoked in the context of the event (some
reentrant function calls may fail for example) but right after (in the same
UI thread) , something like PostMessage to the UI thread.
Is there an easy way in .Net / Windows Forms to "Post" a method call to the
UI thread?
Naturally, "Control.Invoke" will not help since it will identify that it is
the same thread and will execute immidiately. "BeginInvoke" is bad since it
will try to invoke on another thread.
Sometimes while handling an event in the UI thread I need to call some
action but I don't want it to be invoked in the context of the event (some
reentrant function calls may fail for example) but right after (in the same
UI thread) , something like PostMessage to the UI thread.
Is there an easy way in .Net / Windows Forms to "Post" a method call to the
UI thread?
Naturally, "Control.Invoke" will not help since it will identify that it is
the same thread and will execute immidiately. "BeginInvoke" is bad since it
will try to invoke on another thread.