From 01301963b9fe42c74ea3fa0ff7d702e48eff0377 Mon Sep 17 00:00:00 2001 From: Thomas Levesque Date: Wed, 3 Nov 2021 23:06:42 +0100 Subject: [PATCH] Hi-DPI support in demo apps --- samples/NHotkey.WindowsForms.Demo/Program.cs | 1 + .../NHotkey.Wpf.Demo/NHotkey.Wpf.Demo.csproj | 1 + samples/NHotkey.Wpf.Demo/app.manifest | 76 +++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 samples/NHotkey.Wpf.Demo/app.manifest diff --git a/samples/NHotkey.WindowsForms.Demo/Program.cs b/samples/NHotkey.WindowsForms.Demo/Program.cs index 314dd04..9fab627 100644 --- a/samples/NHotkey.WindowsForms.Demo/Program.cs +++ b/samples/NHotkey.WindowsForms.Demo/Program.cs @@ -13,6 +13,7 @@ static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + Application.SetHighDpiMode(HighDpiMode.PerMonitorV2); Application.Run(new Form1()); } } diff --git a/samples/NHotkey.Wpf.Demo/NHotkey.Wpf.Demo.csproj b/samples/NHotkey.Wpf.Demo/NHotkey.Wpf.Demo.csproj index f48ae2a..88ee7f9 100644 --- a/samples/NHotkey.Wpf.Demo/NHotkey.Wpf.Demo.csproj +++ b/samples/NHotkey.Wpf.Demo/NHotkey.Wpf.Demo.csproj @@ -4,6 +4,7 @@ true WinExe false + app.manifest diff --git a/samples/NHotkey.Wpf.Demo/app.manifest b/samples/NHotkey.Wpf.Demo/app.manifest new file mode 100644 index 0000000..648dc43 --- /dev/null +++ b/samples/NHotkey.Wpf.Demo/app.manifest @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + +