From 21f8a90d605238fb9ddf54080e11a737158c287c Mon Sep 17 00:00:00 2001 From: amaitland Date: Tue, 20 Sep 2016 11:58:37 +1000 Subject: [PATCH] Add app.manifest to WinForms example including HighDpi settings Use Cef.EnableHighDPISupport(); also --- .../CefSharp.MinimalExample.WinForms.csproj | 4 ++ CefSharp.MinimalExample.WinForms/Program.cs | 3 + CefSharp.MinimalExample.WinForms/app.manifest | 58 +++++++++++++++++++ CefSharp.MinimalExample.Wpf/app.manifest | 2 +- 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 CefSharp.MinimalExample.WinForms/app.manifest diff --git a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj index 6a1ce02..88e5709 100644 --- a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj +++ b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj @@ -49,6 +49,9 @@ MinimumRecommendedRules.ruleset false + + app.manifest + @@ -87,6 +90,7 @@ + diff --git a/CefSharp.MinimalExample.WinForms/Program.cs b/CefSharp.MinimalExample.WinForms/Program.cs index c9eea82..a1514cf 100644 --- a/CefSharp.MinimalExample.WinForms/Program.cs +++ b/CefSharp.MinimalExample.WinForms/Program.cs @@ -12,6 +12,9 @@ namespace CefSharp.MinimalExample.WinForms [STAThread] public static void Main() { + //For Windows 7 and above, best to include relevant app.manifest entries as well + Cef.EnableHighDPISupport(); + //Perform dependency check to make sure all relevant resources are in our output directory. Cef.Initialize(new CefSettings(), shutdownOnProcessExit:false, performDependencyCheck:true); diff --git a/CefSharp.MinimalExample.WinForms/app.manifest b/CefSharp.MinimalExample.WinForms/app.manifest new file mode 100644 index 0000000..f132393 --- /dev/null +++ b/CefSharp.MinimalExample.WinForms/app.manifest @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + true/PM + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CefSharp.MinimalExample.Wpf/app.manifest b/CefSharp.MinimalExample.Wpf/app.manifest index d8314d3..718d129 100644 --- a/CefSharp.MinimalExample.Wpf/app.manifest +++ b/CefSharp.MinimalExample.Wpf/app.manifest @@ -30,7 +30,7 @@ - true + true/PM