imekon
imekon

Reputation: 1543

Windows 10 display scaling

I have an application which uses three UI frameworks:

The WinForms and WPF forms and dialogs use fonts that are noticeably smaller than the OWL fonts.

If I use DPI scaling (to 125%) in Windows 10, it does a very good job of upscaling a Windows Forms dialog. If I use Scale on a Windows Form it only scales the controls and not the fonts. If I use the functions suggested here:

https://github.com/Microsoft/WPF-Samples/blob/master/PerMonitorDPI/WinFormsHost/MainWindow.xaml.cs

I get scaled controls but not fonts if I only use the form scaling. If I use the extra font scaling functions, that increases the size of the dialog way beyond the original desired scaling (from 1.25 to 1.6 roughly).

Does anyone know how to scale a WinForms form properly like Windows 10 seems to be able to (without changing screen DPI setting to 125%)?

Upvotes: 1

Views: 847

Answers (1)

imekon
imekon

Reputation: 1543

The answer is to place everything in a flow layout or a table layout. Then spend time figuring out how to make sure they layout correctly.

A better answer would be WPF but that's not always an answer.

Upvotes: 0

Related Questions