关闭最大化表格 [英] Closing a maximized form

查看:94
本文介绍了关闭最大化表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
在我的Windows应用程序中,当我尝试关闭最大化窗体时,首先将其转到正常状态,然后在C#.Net中关闭.
因此,请提供一些解决方案以清除此问题.

谢谢.

Hi everybody,
In my windows application, when i tried to close a maximized form, first its go to the normal state and then closing in C#.Net.
So please provide some solutions for clearing this.

Thanking you.

推荐答案

在您的表单中,当您调用this.Close()时,它应该关闭该表单.向我们显示您的代码,我们或许可以为您提供帮助,而不仅仅是说众神​​生气",而您恰好当时正处于他们的阵营中."




In your form, when you call this.Close(), it should close the form. Show us your code, and we may be able to help you beyond saying "The gods are pissed, and you happen to be on their rader at the time."





谢谢您的回复,是的,我编写了此关闭代码,但是此代码背后的操作是首先它将进入规范化阶段并关闭.您只是尝试关闭一个mdi中的最大化形式,您可以看到此问题....

我已经使用了这段代码....

Thank you for your reply, yeah i written this close, but the action behind this code is first it will go to the normalized stage and den closing.You just tried to close a maximized form in a mdi , u can see this problem....

I have used this code....

foreach (Form f in Application.OpenForms)
{
     if(f.name!="frmabc")
     {
       f.close();
       break;
     }
}


这篇关于关闭最大化表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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