如何在Windows窗体中永久关闭背景窗体

编程入门 行业动态 更新时间:2024-10-27 04:24:19
本文介绍了如何在Windows窗体中永久关闭背景窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是Shribab,我正在开发一个Windows Forms应用程序.在这种情况下,我需要在打开子窗体之前永久关闭背景窗体.反之亦然. 我已经尝试过this.Hide();

Hi i am Shribab, i am developing one windows forms app. In that i need to close the background form permanently before opening the child form.Same in reverse also. I have tried with this.Hide(); it is hiding the window not closing.

推荐答案

try this.close(); 或 this.dispose(); try this.close(); or this.dispose();

几天前,有人问了类似的问题. 此处:如何在子表单中关闭父表单 [ ^ ] 您可以隐藏ParentForm,因为您无法将其关闭. ParentForm是父表单,除非子表单已关闭,否则无法关闭. Similar question was asked couple of days back. Here: How to close parent form in child form[^] You can just hide ParentForm as you cannot close it. ParentForm is parent form and it cannot be closed unless child form is closed.

更多推荐

如何在Windows窗体中永久关闭背景窗体

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

发布评论

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

>www.elefans.com

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