- //关闭任意窗体
- FormCollection fmCollection = System.Windows.Forms.Application.OpenForms;
- fmCollection[0].Close();
- //强制关闭程序
- System.Environment.Exit(0);
- //该片段来自于http://www.codesnippet.cn/detail/1901201614446.html
来源: http://www.codesnippet.cn/detail/1901201614446.html