How to minimize window in C #
This article will explain in detail how to minimize the window in C#. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Minimize window
Minimize the window when clicking "X" or "Alt+F4"
Such as:
Protected override void WndProc (ref Message m) {const int WM_SYSCOMMAND = 0x0112; const int SC_CLOSE = 0xF060; if (m.Msg = = WM_SYSCOMMAND & & (int) m.WParam = = SC_CLOSE) {/ / User clicked close button this.WindowState = FormWindowState.Minimized; return;} base.WndProc (ref m) } this is the end of the article on "how to minimize the window of C#". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.