C# Minimize to system tray on close

前端 未结 7 1146
再見小時候
再見小時候 2020-12-28 09:10

Hi In my c# application I am trying to minimize application to systems tray, when the form is closed. Here is the code I have tried.

   public void MinimizeT         


        
7条回答
  •  猫巷女王i
    2020-12-28 09:31

    To minimize when closing set WindowState to Minimized

    private void Form1_FormClosing(Object sender, FormClosingEventArgs e) {
        e.Cancel = true;
        WindowState = FormWindowState.Minimized;
    }
    

提交回复
热议问题