Why isn't my NotifyIcon showing up?

后端 未结 4 1921
暖寄归人
暖寄归人 2020-12-20 11:06

I\'m trying to get a notifyIcon to show a BalloonTip, but it won\'t show up when I press the button

 private void button1_Click(object sender, EventArgs e)
         


        
相关标签:
4条回答
  • 2020-12-20 11:47

    The acknowledged answer is accurate. When your icon is invalid, it will not show up.

    To keep a tray icon visible, the user should drag it from the Hidden Icons popup to the visible Tray part.

    When the user does not do that, there are also some nasty pitfalls with the notifyIcon.Visible property. When the notifications set in the Windows tray settings do not include your App, the Icon will only show up once, the first time you set Visible=true.

    When you set notifyIcon.Visible to false, your icon will be removed, but it will not reappear in the visible Tray part on the Tray, when Visible is set to true again. It will become a hidden tray icon instead.

    To prevent issues, set a valid Icon and set Visible=true only once at the start.. to show alarms or other things, change the notifyIcon.Icon

    0 讨论(0)
  • 2020-12-20 11:55

    There are not that many ways to fumble a NotifyIcon. Except one, if you forget to set its Icon property then it will never show up. Ought to raise an exception but that was overlooked.

    0 讨论(0)
  • 2020-12-20 12:01

    This was the fix in Windows 10:

    1. Open regedit.exe

    2. Navigate to HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced

    3. Set (or add) EnableBalloonTips (as REG_DWORD) and set value to 1

    4. Reboot.

    Perhaps, code it to check the registry and/or notify user..

    0 讨论(0)
  • 2020-12-20 12:02

    If you are using Windows 10 go to Settings > System > Notifications & actions and make sure notifications are switched on for your app. Also make sure 'quiet hours' is not on.

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