dotnet / dotnet/winforms

ChildMdi Container control rendering issues when not Maximized

Open
#6,259 30 comments 0 reactions 0 assignees View on GitHub
area-HDPI-PMv2 area-MDI blocking-migration
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

* .NET Core Version:
dotnet-sdk-7.0.100-alpha.1.21568.2-win-x64

* Have you experienced this same bug with .NET Framework?:
No

**Issue** When moving an MdiParent to a higher DPI monitor, the ChildMdi (not maximized) TabControl on the bottom becomes slightly wider and slightly shorter after multiple moves.

Run the project and click MdiParent - Simple Layout on the 100% monitor
Click on the Maximize/Minimize to un-maximize the ChildMDI form, then drag the MdiParent to the 150% monitor. The Width = 613 and the Height = 261 as displayed in the text box inside the tab control. After moving it to the 100% and back again, the size becomes 619x233. After doing this again, it becomes 816x204 and the tab control now runs past the right edge.
![ChildMDI Not Maximized](https://user-images.githubusercontent.com/2184698/144527632-4b200a9d-4ed1-4847-b2d2-e07ce2635ce0.gif)
[PerMonitorHDPICore - NET 7.0.zip](https://github.com/dotnet/winforms/files/7646074/PerMonitorHDPICore.-.NET.7.0.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.