本文介绍了如何在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窗体中永久关闭背景窗体
发布评论