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

[Feature Request]: Default 'arrow' images, depending on OS version #1218

Open
Tracked by #1204
PWagner1 opened this issue Dec 3, 2023 · 12 comments
Open
Tracked by #1204

[Feature Request]: Default 'arrow' images, depending on OS version #1218

PWagner1 opened this issue Dec 3, 2023 · 12 comments
Assignees
Labels
area:designer All issues related to the designer. enhancement New feature or request new feature A new feature has been requested. regression Something was working in a previous release, but isn't working now. suggestion A suggestion has been requested. under investigation This bug/issue is currently under investigation. version:100 All things to do with V100.
Milestone

Comments

@PWagner1
Copy link
Contributor

PWagner1 commented Dec 3, 2023

No description provided.

@PWagner1 PWagner1 changed the title Default 'arrow' images, depending on OS version [Feature Request]: Default 'arrow' images, depending on OS version Dec 3, 2023
@PWagner1 PWagner1 self-assigned this Dec 3, 2023
@PWagner1 PWagner1 added enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. area:designer All issues related to the designer. labels Dec 3, 2023
@PWagner1 PWagner1 added this to the Version 90 milestone Dec 3, 2023
@Smurf-IV
Copy link
Member

Modern Windows icons can be accessed by a new API, System.Drawing.SystemIcons.GetStockIcon. The System.Drawing.StockIconId enumeration lists all of the available system icon

@PWagner1
Copy link
Contributor Author

Modern Windows icons can be accessed by a new API, System.Drawing.SystemIcons.GetStockIcon. The System.Drawing.StockIconId enumeration lists all of the available system icon

@Smurf-IV Will implement this week, wonder if this can work on KMessageBox 'System Icons' as well?

PWagner1 added a commit that referenced this issue Dec 17, 2023
@PWagner1
Copy link
Contributor Author

Next weeks alpha needs testing on < Windows 10

@PWagner1
Copy link
Contributor Author

PWagner1 commented Dec 17, 2023

@Smurf-IV Seems that StockIconId is a .NET 8 & higher thing and does not contain all shell32/imageres images, https://github.com/dotnet/winforms/pull/8878/files#diff-7afffb5fcac7496d5621c334451483d531566e0c942c374df43e950dce4fe0ac. Wonder if it can be backported?

@PWagner1 PWagner1 added the under investigation This bug/issue is currently under investigation. label Dec 17, 2023
@Smurf-IV
Copy link
Member

As the code shows that it is using win32 calls,
Shell32.SHGetStockIconInfo
then yes

@PWagner1
Copy link
Contributor Author

As the code shows that it is using win32 calls, Shell32.SHGetStockIconInfo then yes

Will create a new feature request, as it's outside the scope of this.

@Smurf-IV
Copy link
Member

It is only going to be used by this, so it is this scope ??

@PWagner1
Copy link
Contributor Author

It is only going to be used by this, so it is this scope ??

To add a new task for #1204

@Smurf-IV Smurf-IV reopened this Dec 27, 2023
@Smurf-IV
Copy link
Member

In the following class CommandLinkImageValues
The code GraphicsExtensions.ScaleImage(GraphicsExtensions.ExtractIcon(Libraries.Shell32, 16805, true)?.ToBitmap(), 32, 32); does not extract an icon that can be used in Windows 10 VS 17.9p2 or in the app that runs from it
In VS the resource is actually a mix of types, and the extract should take that into account when getting a size out.

image

@Smurf-IV Smurf-IV added bug Something isn't working regression Something was working in a previous release, but isn't working now. labels Dec 27, 2023
@PWagner1
Copy link
Contributor Author

In the following class CommandLinkImageValues The code GraphicsExtensions.ScaleImage(GraphicsExtensions.ExtractIcon(Libraries.Shell32, 16805, true)?.ToBitmap(), 32, 32); does not extract an icon that can be used in Windows 10 VS 17.9p2 or in the app that runs from it In VS the resource is actually a mix of types, and the extract should take that into account when getting a size out.

image

@Smurf-IV #1236 might need some attention for this or to use the raw 256 x 256 image, and then scale it?

@Smurf-IV Smurf-IV added completed This issue has been completed. and removed completed This issue has been completed. labels Dec 27, 2023
@Smurf-IV
Copy link
Member

Sorted:
image

@PWagner1
Copy link
Contributor Author

Hi @Smurf-IV & @giduac

Has this been solved yet or is it a v100 thing?

@PWagner1 PWagner1 added the version:100 All things to do with V100. label Jul 4, 2024
@PWagner1 PWagner1 modified the milestones: Version 90, Version 100 Jul 4, 2024
@giduac giduac removed the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:designer All issues related to the designer. enhancement New feature or request new feature A new feature has been requested. regression Something was working in a previous release, but isn't working now. suggestion A suggestion has been requested. under investigation This bug/issue is currently under investigation. version:100 All things to do with V100.
Projects
None yet
Development

No branches or pull requests

3 participants