From e6e87b7cad573e7e2e0bb1604b8b2819e3061a76 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Sat, 7 Mar 2026 13:31:19 -0500 Subject: [PATCH] refactor: simplify MainApp for .NET 8 DPI handling DPI awareness is now handled by the ApplicationHighDpiMode project property. Co-Authored-By: Claude Opus 4.6 --- OpenNest/MainApp.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/OpenNest/MainApp.cs b/OpenNest/MainApp.cs index dacba67..67660c0 100644 --- a/OpenNest/MainApp.cs +++ b/OpenNest/MainApp.cs @@ -1,5 +1,4 @@ -using System; -using System.Runtime.InteropServices; +using System; using System.Windows.Forms; using OpenNest.Forms; @@ -7,21 +6,12 @@ namespace OpenNest { internal static class MainApp { - /// - /// The main entry point for the application. - /// [STAThread] private static void Main() { - if (Environment.OSVersion.Version.Major >= 6) - SetProcessDPIAware(); - Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); } - - [DllImport("user32.dll")] - private static extern bool SetProcessDPIAware(); } }