Skip to content

Weird problem with a .NET CORE 6 Winforms application and Windows 10 scaling #7313

Description

@epikgit

Description

Hi,
I have a really simple Winforms application written in C# with VS Professional 2022 (64-bit) version 17.2.4 and .NET Core 6.0.

It's a form that contains a tab control that contains a table layout panel that contains a listbox.
Every child control is set to anchor to Top, Bottom, Left, Right.
The expected behaviour is, when I resize the form, every child control resizes accordingly.
But this is true only if I scale Windows 10 to 100%. If I switch to 125% the children controls go crazy.

Reproduction Steps

You can download the testing project from here to reproduce the problem
https://1drv.ms/u/s!Aoz_1Yt8KEEpiRQDuNHrNClhPt7g?e=JrU7Tw

Expected behavior

This is the form at 100% scaling
image
And this is the behavior I expect on different scaling too.

Actual behavior

Instead this is the same form at 125% scaling
image

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

area-Anchor/ScalingHDPI issues around anchoring and dockingarea-HDPI-PMv2Issues related to high DPI PerMonitorV2 mode

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions