How to Invoke() when I have no Control available

前端 未结 2 709
逝去的感伤
逝去的感伤 2021-01-24 23:23

I\'m writing a connection handler (a dialog to request username and password). The code is a handler that shows a dialog. This code could be called from a thread, so I need to <

2条回答
  •  伪装坚强ぢ
    2021-01-25 00:04

    A simple solution is to create an invisible control in the main thread on which your worker threads can call Invoke.

提交回复
热议问题