Issue with NotifyIcon not disappearing on Winforms App

前端 未结 7 1822
暗喜
暗喜 2020-12-16 17:38

I\'ve got a .Net 3.5 C# Winforms app. It\'s got no GUI as such, just a NotifyIcon with a ContextMenu.

I\'ve tried to set the NotifyIcon to visible=false and dispose

7条回答
  •  攒了一身酷
    2020-12-16 17:48

    before im sorry for my bad english. if u use "end" for exit program. then dont close notify icon. before u will close notifyicon later close form. u need to use me.close() for run form closing

    example its work...

    notifyIcon1.Icon = Nothing
    notifyIcon1.Visible = False
    notifyIcon1.Dispose()
    Me.Close()
    

    but its not work

    End
    

    or only

    Me.Close()
    

提交回复
热议问题