C# Minimize to system tray on close

前端 未结 7 1142
再見小時候
再見小時候 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条回答
  •  佛祖请我去吃肉
    2020-12-28 09:22

    Write a event in Form Closing event.

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

    And write using Custom menu strip for notification icon for to show.

提交回复
热议问题