且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何关闭从子形式的父窗体在Windows窗体2.0吗?

更新时间:2023-12-06 17:03:34

在你的WinForms紧密的形式,它部署它的所有儿童。因此,这不是一个好主意。你需要做的是异步的,例如,你可以发送邮件到父窗体。

When you close form in WinForms it disposes all of it's children. So it's not a good idea. You need to do it asynchronously, for example you can send a message to parent form.