Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemIcons.GetStockIcon with StockIconId.Settings returns an empty, all-black icon #12447

Closed
brondavies opened this issue Nov 7, 2024 · 6 comments
Assignees
Labels
area-System.Drawing System.Drawing issues external-OS-issue Issue caused by an external OS component such as Common Controls.
Milestone

Comments

@brondavies
Copy link

.NET version

8.0.10

Tested on Windows 11 23H2 Build 22631.4391

Did it work in .NET Framework?

Not tested/verified

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

N/A

Issue description

Get an icon with

SystemIcons.GetStockIcon(StockIconId.Settings, StockIconOptions.SmallIcon)

The returned Icon is a black empty square - not an empty icon.

This feature was implemented in #8802

Steps to reproduce

See attached project

WinFormsApp1.zip

@brondavies brondavies added the untriaged The team needs to look at this issue in the next triage label Nov 7, 2024
@Zheng-Li01
Copy link
Member

Zheng-Li01 commented Nov 8, 2024

Get the below results.
Image

For others which returned correct icon
Image

@elachlan elachlan added the area-System.Drawing System.Drawing issues label Nov 9, 2024
@merriemcgaw
Copy link
Member

merriemcgaw commented Nov 12, 2024

@Zheng-Li01 did it repro in 9 and 10 too?

@merriemcgaw merriemcgaw removed the untriaged The team needs to look at this issue in the next triage label Nov 12, 2024
@merriemcgaw merriemcgaw added this to the .NET 10.0 milestone Nov 12, 2024
@JeremyKuhne
Copy link
Member

This is as expected per the documentation:

https://learn.microsoft.com/windows/win32/api/shellapi/ne-shellapi-shstockiconid#members

There really isn't much we can do here as we're just giving back what Windows gives us. If they choose to put content there in the future we'll get it.

@JeremyKuhne JeremyKuhne added external-OS-issue Issue caused by an external OS component such as Common Controls. 📭 waiting-author-feedback The team requires more information from the author labels Nov 12, 2024
@brondavies
Copy link
Author

@JeremyKuhne Wow! I had previously tried the API directly as well and got the empty icon too. I didn't realize it was documented on that page to return nothing!! 😱
Is there a place where we can submit that as an issue?

@dotnet-policy-service dotnet-policy-service bot added untriaged The team needs to look at this issue in the next triage and removed 📭 waiting-author-feedback The team requires more information from the author labels Nov 12, 2024
@paul1956
Copy link
Contributor

Looks like Laptop icon is also empty, if anyone is reporting it.

@JeremyKuhne
Copy link
Member

The Feedback Hub app in Windows is the place to report issues.

@dotnet-policy-service dotnet-policy-service bot removed the untriaged The team needs to look at this issue in the next triage label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Drawing System.Drawing issues external-OS-issue Issue caused by an external OS component such as Common Controls.
Projects
None yet
Development

No branches or pull requests

6 participants