question

takatto-7074 avatar image
1 Vote"
takatto-7074 asked TimonYang-MSFT commented

Windows custom scaling breaks the Winform app look

I am developing Windows form application using C#. I found that this application is scaled correctly if I used the default scaling offered by Windows 10 (100%, 125%, 150%). But if I used the custom scaling like 110%, 115%, 135%,... the application gone bad. You can see the picture bellow (left is 125% and right is 135%).
93979-picc2.png

Here's the picture of my design so you will get the concept:
93998-pic.png


What I have tried so far: enabled dpi awareness, set AutoResizeMode to none/dpi/font, but didn't work.

Is there anyway I can prevent the Windows from breaking my application if the custom scaling is enabled? I know the Winform is old and also maybe its the Windows problem itself, but any advices will be appreciated.



windows-forms
picc2.png (54.4 KiB)
pic.png (19.7 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@takatto-7074
I used simple textbox and panel controls but did not reproduce the problem. Can you provide a layout to reproduce the problem. It is generally in form.designer.cs.
In addition, have you checked this document: High DPI support in Windows Forms
Please try to add the configuration information in the document to the app.config to see if it is useful.

0 Votes 0 ·

thanks for your reply, as i said above, enabling dpi awareness didnt work, infact the dpi awareness is the reason why my app looks so broken. I've made sure everything scaling is turned off but some how custom scaling managed to "re-enable" it. while default scaling just straight make my app bigger and blurrier (but its ok for me).

0 Votes 0 ·

@takatto-7074
Please check if this post helps to solve the problem of blurred fonts:
How to configure an app to run correctly on a machine with a high DPI setting (e.g. 150%)?

0 Votes 0 ·

0 Answers