NotifyIcon remains in Tray even after application closing but disappears on Mouse Hover

后端 未结 14 1330
清歌不尽
清歌不尽 2020-12-03 00:08

There are many questions on SO asking same doubt. Solution for this is to set

notifyIcon.icon = null and calling Dispose for it in FormClo

14条回答
  •  借酒劲吻你
    2020-12-03 00:56

    Components just must be disposed in the right order like this :

    NotifyIcon.Icon.Dispose();
    
    NotifyIcon.Dispose();
    

    Add this to the MainWindow closing event.

    Hope this will help.

提交回复
热议问题