Form.Show() 是“没有响应...”

发布于 2024-09-29 00:30:00 字数 266 浏览 1 评论 0原文

我的应用程序中有一个小问题。我有一个继承自 Form 的对话框 (d1)。在 Main 中,如果我打电话

d1.ShowDialog

,效果很好。但是调用

d1.Show()

会打开一个带有苍白标签和文本框的错误表单,当我尝试拖动该窗口表单时,它会显示“无响应”。

这是怎么回事?我认为我需要“Show”而不是“ShowDialog”,因为用户应该同时处理多个表单。

I have a little trivial problem in my application. I have a dialog (d1) that inherits from Form. And in Main, if I call

d1.ShowDialog

,it works fine. But calling

d1.Show()

opens a bad form with pale labels and textboxes, and when I try to drag that window form it says "Not Responding."

What's going on? I think I need "Show" and not "ShowDialog," because the user should be dealing with several simultaneous forms.

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

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

发布评论

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

评论(1

谜泪 2024-10-06 00:30:00

听起来问题在于消息循环没有正确连接到表单。不是我的专业领域,但我的第一个想法是确保父表单设置正确。

It sounds like the problem is that the message loop is not being properly hooked up to the form. Not my area of expertise but my first thought would be to make sure the parent form was properly set.

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