How to enable Windows EXIT in the system tray?

I am referring to accessing the system tray, rather than reducing to the system tray, i.e. when you click the "red cross" in the upper right corner of the Windows form, instead of closing the application, it launches in the system tray.

+3
source share
3 answers

You can connect to the event of closing the form and cancel the closing of the event and hide the form

code example

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
            this.Hide();
        }
+3
source

Handle the FormClosing event, block Close ( e.Cancel = true) and instead collapse to the system tray , as if you were, well, minimizing to the system tray .

, , , . , , .

+2

"" , , (, )

, adobe , - , , , , , , .

+1

Source: https://habr.com/ru/post/1761471/


All Articles