5.4.9.4 Beta

This commit is contained in:
Frank Skare
2021-08-24 08:22:59 +02:00
parent 9b5f9a64fd
commit 970dfc069d
5 changed files with 20 additions and 6 deletions

View File

@@ -1117,14 +1117,19 @@ namespace mpvnet
{
base.OnHandleCreated(e);
const int LWA_ColorKey = 1;
SetLayeredWindowAttributes(Handle, 0x111111, 255, LWA_ColorKey);
if (Environment.OSVersion.Version > new Version(10, 0))
SetLayeredWindowAttributes(Handle, 0x111111, 255, LWA_ColorKey);
}
protected override CreateParams CreateParams {
get {
const int WS_EX_LAYERED = 0x00080000;
CreateParams cp = base.CreateParams;
cp.ExStyle = cp.ExStyle | WS_EX_LAYERED;
if (Environment.OSVersion.Version > new Version(10, 0))
cp.ExStyle = cp.ExStyle | WS_EX_LAYERED;
return cp;
}
}