1. 将 Form 的 AutoScaleMode 属性设置为 DPI;
2. 在Program.cs中修改代码
class Program { [STAThread] static void Main() { if (Environment.OSVersion.Version.Major >= 6) SetProcessDPIAware(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern bool SetProcessDPIAware(); }
zz from: https://www.cnblogs.com/jizhiqiliao/p/10001181.html