diff --git a/ShareX/Forms/NotificationForm.cs b/ShareX/Forms/NotificationForm.cs index e45b494e6..8ef20a0fc 100644 --- a/ShareX/Forms/NotificationForm.cs +++ b/ShareX/Forms/NotificationForm.cs @@ -48,13 +48,14 @@ public class NotificationForm : Form private int urlPadding = 3; private Size textRenderSize; - protected override CreateParams CreateParams { - get { - // Turn on WS_EX_TOOLWINDOW style bit - CreateParams cp = base.CreateParams; - cp.ExStyle |= 0x80; - return cp; - } + protected override CreateParams CreateParams + { + get + { + CreateParams createParams = base.CreateParams; + createParams.ExStyle |= (int)(WindowStyles.WS_EX_TOPMOST | WindowStyles.WS_EX_TOOLWINDOW); + return createParams; + } } public NotificationForm(int duration, int fadeDuration, ContentAlignment placement, Size size, NotificationFormConfig config) diff --git a/ShareX/Forms/ScreenRecordForm.cs b/ShareX/Forms/ScreenRecordForm.cs index 98ed0caa4..f13459169 100644 --- a/ShareX/Forms/ScreenRecordForm.cs +++ b/ShareX/Forms/ScreenRecordForm.cs @@ -103,7 +103,7 @@ protected override CreateParams CreateParams get { CreateParams createParams = base.CreateParams; - createParams.ExStyle |= (int)WindowStyles.WS_EX_TOPMOST; + createParams.ExStyle |= (int)(WindowStyles.WS_EX_TOPMOST | WindowStyles.WS_EX_TOOLWINDOW); return createParams; } }