I use for my desktop application ordinary Microsoft Sans Serif with size 7.8 point. This is default font for any windows application control (Net Framework 4.8).
But unfortunately result is terrible. Look to this screen please - position is wrong, sharpness is absent. What going wrong?
Your app needs to have high dpi awareness enabled, to turn it on, follow these steps:
(Right click on your project file on the Solution Explorer, select Add, then New item (or CTRL+SHIFT+A). There you can find Application Manifest File.) The file name is app.manifest. How do I create/edit a Manifest file? 2. Use code to declare compatibility with Windows Paste the following XML code into the manifest file:
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!-- Windows 10 compatibility --> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> </application> </compatibility>
This should be fairly easy to find, but if you're struggling try this page 4. Turn on Per-Monitor DPI awareness In the app.config file, paste the following XML code:
<configuration> <!-- ... other xml settings ... --> <System.Windows.Forms.ApplicationConfigurationSection> <add key="DpiAwareness" value="PerMonitorV2" /> </System.Windows.Forms.ApplicationConfigurationSection> </configuration>
Finally, add the
EnableVisualStyles
method. You need to call it right at the >start of your program. Here is the example on Microsoft's site:static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form2()); }
Hope this helps!