Merge pull request #3022 from sylveon/form-styles

Make notification form topmost, hide screen record form from Alt-Tab and Win-Tab menu
This commit is contained in:
Jaex 2017-12-20 02:16:24 +03:00 committed by GitHub
commit b3d705d531
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View file

@ -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_TOOLWINDOW;
return createParams;
}
}
public NotificationForm(int duration, int fadeDuration, ContentAlignment placement, Size size, NotificationFormConfig config)

View file

@ -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;
}
}