SamKr
10/3/2017 - 3:21 PM

Prevent focus stealing

Prevents a form from stealing focus

protected override bool ShowWithoutActivation => true;
private const int WS_EX_TOPMOST = 0x00000008;
protected override CreateParams CreateParams
{
    get
    {
        var createParams = base.CreateParams;
        createParams.ExStyle |= WS_EX_TOPMOST;
        return createParams;
    }
}