What's wrong with my cross-thread call in Windows Forms?

后端 未结 7 1902
南笙
南笙 2021-01-04 22:32

I encounter a problem with a Windows Forms application.

A form must be displayed from another thread. So in the form class, I have the following code:



        
7条回答
  •  走了就别回头了
    2021-01-04 23:26

    You're probably executing this code before the form has been shown.
    Therefore, InvokeRequired is returning false.

提交回复
热议问题