From b0f25535e13c6113bf4a65af98ab5af378887fbe Mon Sep 17 00:00:00 2001 From: TehDavester Date: Wed, 13 Jul 2016 07:20:32 +0300 Subject: [PATCH] Stop clicking on an overlay from unfocusing the game --- OverlayPlugin.Core/OverlayForm.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OverlayPlugin.Core/OverlayForm.cs b/OverlayPlugin.Core/OverlayForm.cs index 923c3c75f..2d48239a7 100644 --- a/OverlayPlugin.Core/OverlayForm.cs +++ b/OverlayPlugin.Core/OverlayForm.cs @@ -90,10 +90,11 @@ protected override System.Windows.Forms.CreateParams CreateParams const int WS_EX_TOPMOST = 0x00000008; const int WS_EX_LAYERED = 0x00080000; const int CP_NOCLOSE_BUTTON = 0x200; + const int WS_EX_NOACTIVATE = 0x08000000; var cp = base.CreateParams; - cp.ExStyle = cp.ExStyle | WS_EX_TOPMOST | WS_EX_LAYERED; - cp.ClassStyle = cp.ClassStyle | CP_NOCLOSE_BUTTON; + cp.ExStyle = cp.ExStyle | WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_NOACTIVATE; + cp.ClassStyle = cp.ClassStyle | CP_NOCLOSE_BUTTON | WS_EX_NOACTIVATE; return cp; }