|
-
Aug 16th, 2021, 09:17 AM
#1
Thread Starter
Member
VS 2019 - fonts blurred on Windows 10, higher resolution screen
I have searched for this problem and find complicated answers which require messing with system files. Is this a well known problem?
The fonts look fine on two laptops running Windows 7, but when I try to run the program on Windows 10 on another computer with a higher resolution (more pixels) screen, the fonts look blurred. What is a good solution?
This happens for VB.net as well as VB6. I gave up VB6 thinking that VB.net will have several new and useful things but it is creating a lot of trouble. It has been made very complicated.
-
Aug 16th, 2021, 09:37 AM
#2
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
What font's are you using? Can you provide us with a screenshot of the blurred font? What do you have the Form's AutoScaleMode set to?
-
Aug 16th, 2021, 10:24 AM
#3
Thread Starter
Member
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
 Originally Posted by dday9
What font's are you using? Can you provide us with a screenshot of the blurred font? What do you have the Form's AutoScaleMode set to?
The AutoScaleMode is font. Would it help to change this?
By default, I have Microsoft Sans Serif, but the problem is the same for all the available (200+) fonts on that computer.
-
Aug 16th, 2021, 10:26 AM
#4
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
When your monitor has a gratuitously high resolution Windows attempts to help you cope by choosing a high-DPI setting. The idea was to let you use the monitor's native resolution (very important for LCDs) while still having large enough text for you to read it. In other words it trades away screen real estate for readability by "magnifying" everything.
Most applications run in legacy mode, so everything gets scaled up through appcompat shims. This can distort text and bitmap graphics, producing blurring and pixilation.
Some programs can be more usable if you choose GDI Scaling for them ("System Enhanced" display appcompat), a feature in newer versions of Windows 10.
Programming to actually handle High DPI yourself is a big topic though.
This isn't a Windows 10 issue, it's an issue of buying too much monitor. Sadly we often don't have many options to avoid that. Otherwise display devices would be very cheap and profits too low.
-
Aug 16th, 2021, 11:29 AM
#5
Thread Starter
Member
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
 Originally Posted by dilettante
When your monitor has a gratuitously high resolution Windows attempts to help you cope by choosing a high-DPI setting. The idea was to let you use the monitor's native resolution (very important for LCDs) while still having large enough text for you to read it. In other words it trades away screen real estate for readability by "magnifying" everything.
Most applications run in legacy mode, so everything gets scaled up through appcompat shims. This can distort text and bitmap graphics, producing blurring and pixilation.
Some programs can be more usable if you choose GDI Scaling for them ("System Enhanced" display appcompat), a feature in newer versions of Windows 10.
Programming to actually handle High DPI yourself is a big topic though.
This isn't a Windows 10 issue, it's an issue of buying too much monitor. Sadly we often don't have many options to avoid that. Otherwise display devices would be very cheap and profits too low.
Then why are all other programs appearing sharp but only VB6 and VB.net programs do not? Can we not use some settings such that the Form painting is done like in Windows Explorer?
-
Aug 16th, 2021, 12:05 PM
#6
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
No, there are no magic settings.
Microsoft has been gradually improving the high-DPI experience for parts of Windows (like File Explorer) but it has been a challenge even for them.
GDI Scaling is your best bet for a low effort approach. It isn't perfect because GDI+ doesn't participate and DIBs can't be scaled automagically either.
Improving the high-DPI experience in GDI based Desktop Apps is one of the last writeups on this. Microsoft isn't really interested in helping developers of traditional desktop applications because UWP ("Metro reloaded") hasn't done as well as they had hoped.
WPF can adapt to High DPI a little better, though it still has warts the programmer must work around. WinForms doesn't have much support for High DPI unless you do the work yourself. In this it is about the same as VB6's Forms3, both being based on Win32 controls and GDI.
-
Aug 16th, 2021, 12:15 PM
#7
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
-
Aug 18th, 2021, 03:25 AM
#8
Thread Starter
Member
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
 Originally Posted by dilettante
No, there are no magic settings.
Microsoft has been gradually improving the high-DPI experience for parts of Windows (like File Explorer) but it has been a challenge even for them.
GDI Scaling is your best bet for a low effort approach. It isn't perfect because GDI+ doesn't participate and DIBs can't be scaled automagically either.
Improving the high-DPI experience in GDI based Desktop Apps is one of the last writeups on this. Microsoft isn't really interested in helping developers of traditional desktop applications because UWP ("Metro reloaded") hasn't done as well as they had hoped.
WPF can adapt to High DPI a little better, though it still has warts the programmer must work around. WinForms doesn't have much support for High DPI unless you do the work yourself. In this it is about the same as VB6's Forms3, both being based on Win32 controls and GDI.
1. Is there any alternative to VB.net and Visual Studio which will produce good font appearance on smaller as well as bigger (higher resolution) screens?
2. How does Microsoft manage to show sharp fonts in its own software on high dpi screens?
-
Aug 18th, 2021, 08:24 AM
#9
Re: VS 2019 - fonts blurred on Windows 10, higher resolution screen
dilettante eluded to it, though dismissed it, but UWP is probably more what you want. In fact, per Microsoft (here):
To start, if you're creating a new Windows app from scratch, it is highly recommended that you create a Universal Windows Platform (UWP) application. UWP applications automatically—and dynamically—scale for each display that they're running on.
Desktop applications using older Windows programming technologies (raw Win32 programming, Windows Forms, Windows Presentation Framework (WPF), etc.) are unable to automatically handle DPI scaling without additional developer work. Without such work, applications will appear blurry or incorrectly-sized in many common usage scenarios.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|