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

[Multi-Monitor] PerMonitorV2 autoscale lead to wrong ClientSize. #12132

Open
kirsan31 opened this issue Sep 13, 2024 · 0 comments
Open

[Multi-Monitor] PerMonitorV2 autoscale lead to wrong ClientSize. #12132

kirsan31 opened this issue Sep 13, 2024 · 0 comments
Labels
area-HDPI HDPI, not specific to Dpi mode of app area-HDPI-PMv2 Issues related to high DPI PerMonitorV2 mode untriaged The team needs to look at this issue in the next triage

Comments

@kirsan31
Copy link
Contributor

kirsan31 commented Sep 13, 2024

.NET version

8.0.7

Did it work in .NET Framework?

Not tested/verified

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

.Net 6 and 7 have same problem but difference is bigger.
Can't test 9.0RC1 due to build error:

(ResolvePackageAssets target) -> C:\Program Files\dotnet\sdk\9.0.100-rc.1.24452.12\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5):
error NETSDK1060: Error reading assets file: Error loading lock file 'e:\Projects\Other\core tests\WinFormsPerMonitorV2\obj\project.assets.json' :
Could not load file or assembly 'System.Text.Json, Version=8.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

Issue description

PerMonitorV2 app.

  • launch on screen with dpi A will result in ClientSize = CLS1. The same as launch SystemAware app.
  • launch on screen with dpi B and then drag to screen A will result in ClientSize = CLS2.

And CLS1 != CLS2.

image

Steps to reproduce

WinFormsPerMonitorV2.zip

  • launch app, change scale in windows settings.
  • launch app again - compare ClientSize values.

or

  • Change scale in windows settings to other then 100%.
  • launch app, change scale in windows settings to100%.
  • launch app again - compare ClientSize values.
@kirsan31 kirsan31 added the untriaged The team needs to look at this issue in the next triage label Sep 13, 2024
@kirsan31 kirsan31 changed the title [Multi-Monitor] In PerMonitorV2 mode ClientSize different when autosize and fixed start. [Multi-Monitor] PerMonitorV2 autosize lead to wrong ClientSize. Sep 13, 2024
@kirsan31 kirsan31 changed the title [Multi-Monitor] PerMonitorV2 autosize lead to wrong ClientSize. [Multi-Monitor] PerMonitorV2 autoscale lead to wrong ClientSize. Sep 13, 2024
@JeremyKuhne JeremyKuhne added area-HDPI HDPI, not specific to Dpi mode of app area-HDPI-PMv2 Issues related to high DPI PerMonitorV2 mode labels Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-HDPI HDPI, not specific to Dpi mode of app area-HDPI-PMv2 Issues related to high DPI PerMonitorV2 mode untriaged The team needs to look at this issue in the next triage
Projects
None yet
Development

No branches or pull requests

2 participants