在线程中使用openFileDialog1打开文件时,弹出以下报错
“System.Threading.ThreadStateException:“在可以调用 OLE 之前,必须将当前线程设置为单线程单元(STA)模式。请确保您的 Main 函数带有 STAThread”
如图:
解决方式如下,仅供参考:
在线程中使用openFileDialog1打开文件时,弹出以下报错
“System.Threading.ThreadStateException:“在可以调用 OLE 之前,必须将当前线程设置为单线程单元(STA)模式。请确保您的 Main 函数带有 STAThread”
如图:
解决方式如下,仅供参考: