ShowBalloonTip Not Working
Asked Answered
T

7

14

On Windows 10, the ShowBalloonTip method of NotifyIcon NEVER shows the balloon tip. This would appear to have something to do with Windows itself.

If I go to Settings > System > Notifications & actions > and find my running app (vshost32.exe in debug mode) and click on it, then turn on Show notifications in the action center, I can clearly see the balloon tip messages being added to the notifications, but never a balloon tip.

I assume this is a problem with Windows 10.

My NotifyIcon is VISIBLE

my_icon.ShowBalloonTip("Title", "Message", BalloonIcon.Info);
Theodoratheodore answered 24/2, 2017 at 17:14 Comment(0)
I
13

On my computer with Windows 10 version 1803, go to Settings > System > Notifications & actions, and turn on "Get notifications from apps and other senders". The ballontips from my WPF app will show up.

Individualize answered 15/8, 2018 at 15:16 Comment(0)
T
8

Found the problem - was simple: Quiet Hours was turned on in the notification center and this was preventing the balloon tips.

Theodoratheodore answered 24/2, 2017 at 18:20 Comment(1)
Also note that, on Windows 10, the Push Notifications service must be running (wasn't your case but may help someone else). I had disabled it because I thought it was related to remote notifications (coming from remote servers), but it turned out it also handles the notifications from local apps, both toasts and balloons.Loxodrome
I
5

I've fixed the problem by adding icon property. If this property isn't set, the baloontip won`t be shown. Here's example of my code:

var notify = new NotifyIcon();
notify.Visible = true;
notify.Icon = new System.Drawing.Icon(@"D:\Users\User\Desktop\some.ico");
int code = new Random().Next(1000, 9999);
notify.ShowBalloonTip(500, "code", $"{code}", ToolTipIcon.Info);
Ileac answered 30/4, 2022 at 12:32 Comment(0)
E
4

Turn off Focus Assist. If you are using second screen, turn off "When I'm duplicating my display" option. My settings is like that:

enter image description here

Euraeurasia answered 18/8, 2020 at 8:41 Comment(2)
Thanks. It worked for me/Variegated
for me as well!Wither
M
2

Change the Solution Configuration "Debug mode to Release mode" with X64 or X32 Solution platform. It will start work.

 public static NotifyIcon trayIcon;
 trayIcon = new NotifyIcon();
 trayIcon.Icon = new Icon("Images/Test.ico");
 trayIcon.Visible = true; trayIcon.Text=Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName);
 ContextMenu contextMenu1 = new ContextMenu();
contextMenu1.MenuItems.Add("Menu2", Menu2_Event);
contextMenu1.MenuItems.Add("Menu3", Menu3_event);
contextMenu1.MenuItems.Add("Exit", Close_Click);
trayIcon.ContextMenu = contextMenu1;
trayIcon.BalloonTipText = "Hi Test";
trayIcon.ShowBalloonTip(1000);
Melentha answered 19/8, 2020 at 5:4 Comment(0)
S
0

Neither of these solved my issue :(

But by accident I fixed it! My problem was I had my project configured for 32-bit on a 64-bit platform and for whatever reason they only show up when when I run the project for Any CPU (64-bit in this case)!!

Hopefully that helps some of you, it was a real mystery for me...

(I also posted this answer here because these are duplicate questions)

Sidecar answered 23/11, 2019 at 0:40 Comment(0)
T
0

Just for reference, as @rmirabelle wrote in the question "My NotifyIcon is VISIBLE". This is actually important. If the notification icon is not visible in the systray, the BalloonTips won't show up either.

Possible sources for invisibility are:

  • Visible property = false
  • No icon is set for the NotifyIcon object
Ten answered 23/2, 2021 at 16:29 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.