C#在高分屏上让窗体程序忽略系统的显示缩放

[STAThread]
    static void Main() {
        if (Environment.OSVersion.Version.Major >= 6) SetProcessDPIAware();
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new Form1());             // Edit as needed
    }

    [System.Runtime.InteropServices.DllImport("user32.dll")]
    private static extern bool SetProcessDPIAware();

 

posted @ 2017-12-18 12:34  会弹猫的吉他  阅读(918)  评论(0编辑  收藏  举报