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)
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
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.
This was the fix in Windows 10:
Open regedit.exe
Navigate to HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced
Set (or add) EnableBalloonTips (as REG_DWORD) and set value to 1
Reboot.
Perhaps, code it to check the registry and/or notify user..
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.