黄聪:子窗口退出程序方法

button2为子窗口的退出按钮,要退出全部程序,代码可以如下:

 

       private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
            System.Environment.Exit(0);
            this.Close();
            Application.ExitThread();       
        }

原文地址:https://www.cnblogs.com/huangcong/p/1697108.html