hardcodet / wpf-notifyicon

NotifyIcon (aka system tray icon or taskbar icon) for the WPF platform
MIT License
860 stars 133 forks source link

Standard (OS) Balloon Tips not Showing #64

Open BrunoJuchli opened 3 years ago

BrunoJuchli commented 3 years ago

When I get a copy of the source and build NotifyIconWpf.Sample.ShowCases the standard OS balloon tips don't show:

grafik

It doesn't matter whether I choose "Show as Info", "Show as Error" or "Show Custom Icon".

The custom balloon shows. Everything else also seems to work as expected. grafik

I'm on Windows 10 Version 2004 (1904.1165).

I also checked the OS settings which AFAIK seem to be ok:

grafik

Focus assist is turned off: grafik

The sample app also doesn not show up in the list of notification senders: grafik

(Not sure if applications which show balloon tips are supposed to show up in this list).

Administrate templates are all on "Not configured": grafik

(same goes for "Computer Configuration")

BrunoJuchli commented 3 years ago

I just tried the enabling "Disable showing balloon notifications as toasts" policy but it didn't change anything. Note that I did restart the computer after enabling it. grafik

I also tried the .net 5, 4.7.2 and 4.5 versions of the sample application. It's all the same.

Also tried it on another computer at work... and it's still all the same.

Lakritzator commented 2 years ago

For me the Show as info / Show as error work as they should, the custom icon doesn't. Is that what you mean?

BrunoJuchli commented 2 years ago

Nope for me it was exactly the other way round -- custom did work but "Show as Info" / "Show as error" didn't work. See print screen in first post.

We then changed to using Toast Notifications, I believe via Microsoft.Toolkit.Uwp.Notifications. Also I don't work at that company anymore....

So if this ain't reproducible by others then shall we close the issue?

rizwan1239 commented 2 years ago

For me the Show as info / Show as error work as they should, the custom icon doesn't. Is that what you mean?

Same in my case. Is there a way to make custom icon work?

moon6969 commented 2 years ago

I'm getting both issues in different places of NotifyIconWpf.Sample.ShowCases! In Tutorials → Balloon Tips, "Show Standard Balloon" does nothing, but "Show Custom Balloon" works. In Open Sample Window → Standard (OS) Balloon Tips, "Show as Info" and "Show as Error" both work, but "Show Custom Icon" does nothing.

I started looking at this because standard OS balloon tips stopped working in my app - custom balloon tip works. and while showing a custom ballon tip was working it was giving System.IO.IOException in the log (was path issue).

coder43 commented 2 years ago

Same here, it's using a custom icon in Standard Balloon that doesn't work. Tutorials - Balloon Tips - Show Standard Balloon -> uses MyNotifyIcon.Icon (which is a custom Icon). Using Balloon.None, .Info, .Warning and .Error all work ok. I've tried adding , largeIcon: true e.g. MyNotifyIcon.ShowBalloonTip(title, text, new System.Drawing.Icon(iconStream), largeIcon: true); as well as making all sorts of different icons like 16x16 only 32x32 only and icons with all different sizes after looking at this: https://docs.microsoft.com/en-us/dotnet/api/system.drawing.icon?view=dotnet-plat-ext-6.0 but cant get anything to work

Porterbg commented 2 years ago

I'm using ShowBalloonTip(title, text, icon, true); nothing appears but i get in the output Exception thrown: 'System.Runtime.InteropServices.COMException' in System.Private.CoreLib.dll Exception thrown: 'System.Runtime.InteropServices.COMException' in System.Private.CoreLib.dll Exception thrown: 'System.Runtime.InteropServices.COMException' in System.Private.CoreLib.dll Exception thrown: 'System.NotImplementedException' in System.Private.CoreLib.dll and that four times for one call of ShowBalloonTip. I'm using .net 6 but I tried .net 5 and it is the same.

Lakritzator commented 2 years ago

I have no idea what this is, but didn't have time to look at it yet.

To me it does seem to be more of a generic .NET issue. If I understand @coder43, it might be a customer icon thingy and happens with code outside of this project, maybe there is a bug in the .NET 5/6 code...

Can someone make a small example repo to reproduce the issue, so we (I, you, whoever wants to) can report this?