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

后端 未结 14 1360
清歌不尽
清歌不尽 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条回答
  •  旧时难觅i
    2020-12-03 00:54

    I had the exact same problem as you.

    The proper way are send WM_CLOSE message to a process.
    I use the c# code I found in this article.
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/82992842-80eb-43c8-a9e6-0a6a1d19b00f/terminating-a-process-in-a-friendly-way

提交回复
热议问题