zoukankan      html  css  js  c++  java
  • C# Winform界面不能适配高DPI的解决方法

    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
  • 相关阅读:
    LeetCode "Sum Root to Leaf Numbers"
    LeetCode "Single Number"
    POJ #1033
    POJ #1011
    POJ #2411
    POJ #1276
    POJ #1260
    POJ #1221
    POJ #1080
    POJ #1050
  • 原文地址:https://www.cnblogs.com/flyflit/p/12926132.html
Copyright © 2011-2022 走看看