dotnet / dotnet/winforms

[Multi-Monitor][PermonitorV2] ColorDialog is not scaled well on secondary screen

Open
#8,263 0 comments 0 reactions 1 assignee Claimed by @ricardobossan View on GitHub
area-HDPI-PMv2
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.225727.7

### Did it work in .NET Framework?

No

### 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

**ColorDialog is not scaled well when move from 100% primary to 300% secondary monitor**
![image](https://user-images.githubusercontent.com/86937911/203455603-5595c3e8-8d81-4ddd-8fec-bee423c6d92a.png)

**ColorDialog is not scaled well when move from 300% primary to 100% secondary monitor**
![image](https://user-images.githubusercontent.com/86937911/203458904-11e1fb11-cb3c-4b34-8a92-ee9771aa7eff.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 button and colordialog control to form designer.
5. Double click the Button control to generate a click event and add below code: `colorDialog1.ShowDialog();`
6. Build and run it, click button control.
7. Move to 300% secondary monitor.

Or:
1. Extract and open [Testcolordialog.zip](https://github.com/dotnet/winforms/files/10073083/Testcolordialog.zip) on 100% primary screen.
2. Build and run it, click button control.
3. Move to 300% secondary monitor.

**Actual result:**
ColorDialog is not scaled well when move from 100% primary screen to 300% secondary monitor.

**Expected result:**
ColorDialog should be scaled well when move from 100% primary screen to 300% secondary monitor.

**More info:**
1. This issue doesn't repro on SystemAware and DpiUnware mode.
2. This issue also repro on move from 300% primary screen to 100% secondary monitor.

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.