Execute a delegate in the ui thread (using message pump)

后端 未结 5 1649
抹茶落季
抹茶落季 2020-12-19 16:18

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

5条回答
  •  再見小時候
    2020-12-19 17:02

    You can use Control.Invoke and use a delegate. The delegate will be executed on the thread that created the control.

    http://msdn.microsoft.com/en-us/library/zyzhdc6b.aspx

提交回复
热议问题