mirror of
https://github.com/hykilpikonna/AquaDX.git
synced 2026-08-08 12:05:53 -05:00
28 lines
711 B
C#
28 lines
711 B
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace AquaMai.ErrorReport;
|
|
|
|
public class Program
|
|
{
|
|
[DllImport("SHCore.dll")]
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
public static extern bool SetProcessDpiAwareness(DPI_AWARENESS awareness);
|
|
|
|
// 定义 DPI_AWARENESS 枚举
|
|
public enum DPI_AWARENESS
|
|
{
|
|
DPI_AWARENESS_INVALID = -1,
|
|
DPI_UNAWARE = 0,
|
|
SYSTEM_AWARE = 1,
|
|
PER_MONITOR_AWARE = 2
|
|
}
|
|
|
|
[STAThread]
|
|
public static void Main()
|
|
{
|
|
SetProcessDpiAwareness(DPI_AWARENESS.SYSTEM_AWARE);
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
Application.Run(new CrashForm());
|
|
}
|
|
} |