mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-06 05:05:42 +13:00
Make notification form topmost, hide screen record form from Alt-Tab and Win-Tab menu
This commit is contained in:
parent
330f77d7bb
commit
834f2d9ba2
2 changed files with 9 additions and 8 deletions
|
@ -48,13 +48,14 @@ public class NotificationForm : Form
|
||||||
private int urlPadding = 3;
|
private int urlPadding = 3;
|
||||||
private Size textRenderSize;
|
private Size textRenderSize;
|
||||||
|
|
||||||
protected override CreateParams CreateParams {
|
protected override CreateParams CreateParams
|
||||||
get {
|
{
|
||||||
// Turn on WS_EX_TOOLWINDOW style bit
|
get
|
||||||
CreateParams cp = base.CreateParams;
|
{
|
||||||
cp.ExStyle |= 0x80;
|
CreateParams createParams = base.CreateParams;
|
||||||
return cp;
|
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)
|
public NotificationForm(int duration, int fadeDuration, ContentAlignment placement, Size size, NotificationFormConfig config)
|
||||||
|
|
|
@ -103,7 +103,7 @@ protected override CreateParams CreateParams
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
CreateParams createParams = base.CreateParams;
|
CreateParams createParams = base.CreateParams;
|
||||||
createParams.ExStyle |= (int)WindowStyles.WS_EX_TOPMOST;
|
createParams.ExStyle |= (int)(WindowStyles.WS_EX_TOPMOST | WindowStyles.WS_EX_TOOLWINDOW);
|
||||||
return createParams;
|
return createParams;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue