dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.41k stars 981 forks source link

NotifyIcon.Icon updates not displayed in Notifications in Windows 11 #12373

Open elixss opened 5 days ago

elixss commented 5 days ago

.NET version

.NET 8

Did it work in .NET Framework?

Not tested/verified

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Yes, .NET 6, 7 and 8 on Windows 10.

Issue description

Hello!

I stumbled accross some sort of bug.

When using the NotifyIcon class and setting an icon, the notifications sent by that NotifyIcon using ShowBalloonTip don't match if that icon was updated. This only happens on Windows 11. I tested it on various machines, 3 Windows 10 machines and 3 windows 11 machines, one of them Windows 11 machines was 24H2. all windows 10 were 22H2.

Steps to reproduce

I created a repo for that! https://github.com/elixss/NotifyIconTest

Clone it, run it and compare: on windows 10 the icons will match from notifications and tray, on windows 11 they won't.

elixss commented 5 days ago

sorry if i missed tags i don't do this very often this is a BUG i want to report this as a bug.

JeremyKuhne commented 5 days ago

@Olina-Zhang can repro this issue?

John-Qiao commented 4 days ago

@JeremyKuhne yes, we can repro this issue in Win11 OS, please check below details:

In Win10 machine (.NET 6.0, .NET 8.0, .NET 9.0, .NET 10.0 and .NET Framework 4.8.1 all are the same result):

Image

https://github.com/user-attachments/assets/b2e18325-dde0-4780-b5fb-b130c0e79fec

In Win11 machine (.NET 6.0, .NET 8.0, .NET 9.0, .NET 10.0 and .NET Framework 4.8.1 all are the same result):

Image

https://github.com/user-attachments/assets/ffc0e959-b824-4c31-90ff-f9375cea11fe