标签: c# forms
可能重复: How do I prevent the app from terminating when I close the startup form?
如何在主窗体关闭时停止应用程序结束? 我想检查是否Application.OpenForms.Count == 1然后关闭应用程序,如果它是真的。因此,我希望在最后一个表单关闭时关闭应用程序。
Application.OpenForms.Count == 1