如何在Windows窗体中永久关闭背景窗体 [英] how to close the background form permanently in windows forms

查看:90
本文介绍了如何在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窗体中永久关闭背景窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆