如何在 Windows 窗体中创建窗体模式?

编程入门 行业动态 更新时间:2024-10-26 20:32:04
本文介绍了如何在 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 窗体中创建窗体模式?

本文发布于:2023-11-03 07:49:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1554609.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:窗体   模式   如何在   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!