Program.cs 708 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Windows.Forms;
  3. namespace quick_color_picker
  4. {
  5. internal static class Program
  6. {
  7. [STAThread]
  8. private static void Main()
  9. {
  10. if (Environment.OSVersion.Version.Major >= 6)
  11. {
  12. SetProcessDPIAware();
  13. }
  14. ThemeManager.allowDarkModeForApp(true);
  15. Application.EnableVisualStyles();
  16. Application.SetCompatibleTextRenderingDefault(false);
  17. Application.Run(new MainForm(ThemeManager.isDarkTheme()));
  18. }
  19. [System.Runtime.InteropServices.DllImport("user32.dll")]
  20. private static extern bool SetProcessDPIAware();
  21. }
  22. }