How to continue executing code after calling ShowDialog()

后端 未结 7 801
走了就别回头了
走了就别回头了 2020-12-17 10:58

the Form.ShowDialog() method causes the code to be halted until the newly called form is closed. I need the code to continue running after the ShowDialog() method is called.

7条回答
  •  一生所求
    2020-12-17 11:23

    To continue code execution without closing modal dialog WindowsFormsSynchronizationContext.Current.Post(-=> {"Your code"}, null); can be used. Here you can find more detail -

    http://newapputil.blogspot.in/2015/05/continue-executing-code-after-calling.html

提交回复
热议问题