dotnet / dotnet/winforms

[PermonitorV2] [SystemAware] The default ImageIcon in ToolStrip is not scaled well on 300% primary screen with app created on 100% DPI

Open
#8,247 1 comment 0 reactions 0 assignees View on GitHub
area-HDPI-SA
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

.NET 8.0.100-alpha.1.22565.7

### Did it work in .NET Framework?

Yes

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

No, it also repro on .NET 6.0 & 7.0.

### Issue description

The default ImageIcon in ToolStrip is smaller than Text on 300% primary screen with app created on 100% DPI under PermonitorV2/SystemAware modes.
![image](https://user-images.githubusercontent.com/62929087/203281759-dc141213-5bef-4802-a7e3-27975323b15a.png)

The default ImageIcon in ToolStrip is larger than Text on 100% primary screen with app created on 300% DPI under DpiUnware/PermonitorV2/SystemAware modes.
![image](https://user-images.githubusercontent.com/62929087/203277588-a3dc4298-e4d1-4f94-b359-8fe910488995.png)

### Steps to reproduce

1. Launch VS instance on 100% primary screen.
2. Create a WinForms .NET core project.
3. Add `PerMonitorV2` in csproj file.
4. Drag and drop a ToolStrip to form designer.
5. Then insert standard items for MenuStrip/ToolStrip via clicking ‘Insert Standard Items’ in controls’ Tasks panel.
6. Close this project.
7. Launch VS instance on 300% primary screen.
8. Build and run.

Or:
1. Extract and open [TestApp.zip](https://github.com/dotnet/winforms/files/10066010/TestApp.zip) on 300% primary screen.
2. Build and run it.

**Actual result:**
The default ImageIcon in ToolStrip is smaller than Text on 300% primary screen.
![image](https://user-images.githubusercontent.com/62929087/203281645-4d6623f1-0fb3-4d97-ae2b-4b21e4fc6e9c.png)

**Expected result:**
The default ImageIcon in ToolStrip should be scaled well on 300% primary screen.
![image](https://user-images.githubusercontent.com/62929087/203279604-0c37e71e-0711-4f49-adc3-4fadebd3aacd.png)

**More info:**
1. This issue repro on PermonitorV2/SystemAware modes when app created on 100% DPI and run app on 300% DPI and it doesn't repro on DpiUnware mode.
2. This issue repro on DpiUnware/PermonitorV2/SystemAware modes when app created on 300% DPI and run app on 100% DPI.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.