Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why isn't my NotifyIcon showing up?

Tags:

c#

winforms

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)
 {                                    
       OsWatchNotify.Visible = true;
       OsWatchNotify.BalloonTipText = "Example";
       OsWatchNotify.BalloonTipTitle = "example title";
       OsWatchNotify.ShowBalloonTip(1);                          
 }

any and all help would be appreciated.

like image 562
Captain_Custard Avatar asked Jun 06 '13 12:06

Captain_Custard


3 Answers

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.

like image 66
Hans Passant Avatar answered Oct 01 '22 14:10

Hans Passant


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.

like image 28
Jim Culverwell Avatar answered Oct 01 '22 16:10

Jim Culverwell


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..

like image 44
Sujeet Shrestha Avatar answered Oct 01 '22 15:10

Sujeet Shrestha