Skip to content

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

Open

Description

.NET version

8.0.7

Did it work in .NET Framework?

No.

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

.Net 5 - 7 have similar problem but the difference is match smaller.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area-HDPIHDPI, not specific to Dpi mode of apparea-HDPI-PMv2Issues related to high DPI PerMonitorV2 mode

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions