I have a background thread that handles communication with an external service. Each time the background thread receives a message I\'d like to pass it to the UI thread for
If your GUI thread has blocked and does not process any messages, you could use Application.DoEvents
to force the GUI thread to process all awaiting messages on that thread.
To pump messages to the thread of the Control, certainly you can use the Control.BeginInvoke
or Control.Invoke
methods but note that Control.Invoke
will block if the owning thread of the Control
is currently blocking.