区别 form.Close() 和 form.hide() [英] Difference form.Close() and form.hide()

查看:33
本文介绍了区别 form.Close() 和 form.hide()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

桌面应用中的 form.Close() 和 form.Hide() 有什么区别.

What is the difference between form.Close() and form.Hide() in desktop application.

我知道 Form_Close 事件不会在 form.Hide() 方法中被触发,还有什么其他区别.

i know Form_Close event will not be fired in form.Hide() method what about other differences.

有人更快吗?

推荐答案

隐藏使表单对用户不可见.Close 实际上是关闭它并调用它的 dispose.

Hide makes the form invisible to the user. Close actually closes it and calls dispose on it.

来自:http://msdn.microsoft.com/en-us/library/system.windows.forms.form.close(v=vs.110).aspx

当一个表单关闭时,该对象内创建的所有资源都将关闭并释放该表单."

"When a form is closed, all resources created within the object are closed and the form is disposed. "

这篇关于区别 form.Close() 和 form.hide()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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