C# MTAThread 应用程序上的 OpenFileDialogs

发布于 2024-08-06 00:09:32 字数 131 浏览 1 评论 0原文

好的,我知道 OpenFileDialogs 需要 STAThread,但我想从控制台应用程序启动表单,因此我为表单创建一个线程,这样我可以在使用表单时将内容打印到控制台,问题是如果我想使用 OpenFileDialogs 那么我无法打印到控制台!

Ok, I know that OpenFileDialogs needs STAThread, but i want to start the form from a console application, so I create a Thread for the Form that way I can print things to the console while working with the form, the problem is that if I want to use OpenFileDialogs then I can not print to the console!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文