R
R
romaro2015-07-10 00:30:57
Windows
romaro, 2015-07-10 00:30:57

How to overcome the loss of text sharpness in WinForms when scaling?

I have a program in C#.
Through the screen settings, increase the scaling to 150%.
Texts with WinForms become blurry while the font of native Windows windows remains sharp. Is it possible to make the texts in the application also not lose clarity when zoomed?
3kwAZ0t.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Evseev, 2015-07-10
@romaro

Can. For starters, it's a good idea to read this "Difficulties of modern scaling":
Part 1
Part 2
Part 3
Part 4
Part 5
For the rest - you need to put a sign that the application is DpiAware
stackoverflow.com/a/13228495/4758517
stackoverflow.com/questions/4075802/creating -a-dpi...
www.telerik.com/blogs/winforms-scaling-at-large-dp...
well, if you have .NET 4.5.2, then you are more lucky:
www.infoq.com/news /2014/05/DotNet-4-5-2

L
Lexans, 2015-07-11
@Lexans

I solved the problem globally. Added explorer to blur scaling exceptions. At the same time, scaling is also disabled in all other applications.
This is done with the following registry tweak

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Windows\\explorer.exe"="~ HIGHDPIAWARE"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question