dotnet / dotnet/winforms

Opening Dialog Form on multi-monitor setup using HDPI PerMonitorV2 does not scale properly

Open
#11,512 3 comments 0 reactions 0 assignees View on GitHub
area-Anchor/Scaling area-HDPI
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

.NET 9 Preview 4

### Did it work in .NET Framework?

Yes

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

This worked in .NET 6.0

### Issue description

Opening a modal Dialog form on a 150% monitor does not scale properly and the buttons anchored to the bottom right do not anchor properly. They are rendered underneath controls above them and are unusable.

https://github.com/dotnet/winforms/assets/2184698/b60b5e9f-778c-49f2-96de-621a332c31a0

### Steps to reproduce

1. Open the project on a 100% monitor.
2. Click on Edit Non-Modal and Edit Modal. Both forms scale properly and are the same size.
3. Move the MDIParent to a 150% monitor.
4. Click on Edit Non-Modal and the form looks OK, but the buttons overlap slightly with the controls above them.
5. Click on Edit Modal and the buttons are higher and completely under other controls making them unusable. The form itself is also larger than the Non-Modal version.

Here is a sample project:
[DialogIssue.zip](https://github.com/user-attachments/files/15745870/DialogIssue.zip)

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.