Skip to content

Conversation

@fowl2
Copy link

@fowl2 fowl2 commented May 9, 2023

Seems to mostly work, but more of a MVP/POC.

Followed the instructions here: High DPI support in Windows Forms

On my Windows 10 22H2 machine, I can drag a window from my main display at 100% to another at 125% without it becoming blurry.

Also upgrades to .NET 4.8 - targeting .NET 4.7 didn't seem to scale tool strips correctly. This is only needed for the main project, but it would probably make sense for the others too?

@MscrmTools
Copy link
Owner

Thank you for helping on this one!
If I read it correctly, it seems each and every form must be set to scale to DPI?

@fowl2
Copy link
Author

fowl2 commented Jun 7, 2023

I did a few experiments (that I really should've recorded the outcome of) and AutoScaleMode.Dpi is what seemed to give the best results. IIRC I basically did a find and replace instead of opening each form in the designer - that may give better results.

Copy link

@Stitti Stitti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also works well for me on my Windows 10 computer with one screen at 100% and the second at 125%.
If some projects are already running on .Net Framework 4.8 anyway, I agree that we might as well upgrade them all

@rnwood
Copy link

rnwood commented Dec 2, 2025

Voting for this issue as I believe it affects one of the controls in my plugin (from an external dependency).

On a normal DPI monitor, the font size is roughly 2x size of same on a high DPI monitor. The rest of the standard winforms controls render correctly.

Edit: This seems like a good test case for this PR. I will rebase it and test then feedback here.

@rnwood
Copy link

rnwood commented Dec 3, 2025

As above, I tested this again to see if it would fix my particular issue.

There's still a bit of work to do here if this is to be merged. I rebased this and tested it (also did another replace on the per form DPI settings as above) and it's a bit of a mess with the layout broken in a few places of the main form (NewForm). Possibly wider as I didn't go beyond in detail.

Crucially for me, it did not resolve the issue in the ConEmu control I am using. I guess it has client rendering.

So removing my vote from this issue. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants