remove application icon from the taskbar using .net with c#

后端 未结 2 542
南旧
南旧 2021-01-26 05:34

I am trying to show icon on the taskbar, well i did this in this way.

ResourceManager resManager = new ResourceManager(\"TestAgent.Properties.Resources\", GetTy         


        
相关标签:
2条回答
  • 2021-01-26 05:45

    Simply Dispose it.

    In a Windows Form you can subscribe to the global event ApplicationExit ...

    Application.ApplicationExit += new EventHandler(this.OnApplicationExit);
    
    private void OnApplicationExit(object sender, EventArgs e) {
         notifyicon.Dispose();
    }
    
    0 讨论(0)
  • 2021-01-26 05:52

    simply write notifyIcon.Visible = false; (capital I in Icon) before closing the window, and you are good to go. As simple as that.

    0 讨论(0)
提交回复
热议问题