Get the App
SLTechnology News&Howtos  ›  Development  › 

How to minimize window in C #

Shulou Source: shulou.com Published: 2022-06-01 05:49:56 10月03日 Update

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.

Tags: Minimum articles more good practical content articles knowledge reference help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Huawei Linux Docker NVidia