protected override void WndProc(ref System.Windows.Forms.Message m) { const int wm_syscommand = 0x0112; const int sc_close = 0xF060; if (m.Msg == wm_syscommand && (int)m.WParam == sc_close) { this.WindowState = FormWindowState.Minimized; return; } base.WndProc(ref m); }
c# 关闭 窗口最小化
最新推荐文章于 2024-04-24 14:48:54 发布