摘要:
protected override void WndProc(ref Message m) { //Console.WriteLine(m.Msg); const int WM_SYSCOMMAND = 0x0112; const int SC_CLOSE = 0xF060; if (m.Msg == WM_SYSCOMMAND && (int)m.WParam == SC_CLOSE) { //捕捉关闭窗体消息 //用户点击关闭窗体控制按钮 注释为最小化窗体 //this.WindowState = FormWindowState.Minimized; //窗体隐藏 this.Hide 阅读全文