本文介绍了如何在 Windows 窗体中创建窗体模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试创建一个子表单,帮助用户为父表单中的字段输入数据.我希望这个子表单是模态的,但是我需要做什么才能使这个表单成为模态?
I'm trying to create a child form that helps the user to enter data for a field in the parent form. I want this child form to be modal, but what do I need to do to make this form modal?
我需要使用其他类型的物品吗?
Is there's a different type of item I need to use?
推荐答案使用 Form.ShowDialog()
正如 Bob 提到的,您应该设置 Form.DialogResult 相应地在您的模态表单上.
As Bob mentioned, you should set Form.DialogResult accordingly on your modal form.
更多推荐
如何在 Windows 窗体中创建窗体模式?
发布评论