Form.Show() 是“没有响应...”
我的应用程序中有一个小问题。我有一个继承自 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来问题在于消息循环没有正确连接到表单。不是我的专业领域,但我的第一个想法是确保父表单设置正确。
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.