From 54d12686af2fd133ab390134b81b88790139f9e1 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Fri, 11 Aug 2017 11:32:20 +0200
Subject: [PATCH] Tweak video player UI handling

---
 video/TweetDuck.Video/FormPlayer.Designer.cs | 3 +++
 video/TweetDuck.Video/FormPlayer.cs          | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/video/TweetDuck.Video/FormPlayer.Designer.cs b/video/TweetDuck.Video/FormPlayer.Designer.cs
index 07f50633..83354992 100644
--- a/video/TweetDuck.Video/FormPlayer.Designer.cs
+++ b/video/TweetDuck.Video/FormPlayer.Designer.cs
@@ -48,9 +48,12 @@ private void InitializeComponent() {
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(120, 120);
+            this.ControlBox = false;
             this.Controls.Add(this.player);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Location = new System.Drawing.Point(-32000, -32000);
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
             this.Name = "FormPlayer";
             this.ShowIcon = false;
             this.ShowInTaskbar = false;
diff --git a/video/TweetDuck.Video/FormPlayer.cs b/video/TweetDuck.Video/FormPlayer.cs
index 449799d6..4e7acc3e 100644
--- a/video/TweetDuck.Video/FormPlayer.cs
+++ b/video/TweetDuck.Video/FormPlayer.cs
@@ -28,7 +28,7 @@ private void FormPlayer_Load(object sender, EventArgs e){
         }
 
         private void timer_Tick(object sender, EventArgs e){
-            if (NativeMethods.GetWindowRect(ownerHandle, out NativeMethods.RECT rect) && rect.Top != -32000){
+            if (NativeMethods.GetWindowRect(ownerHandle, out NativeMethods.RECT rect)){
                 int width = rect.Right-rect.Left+1;
                 int height = rect.Bottom-rect.Top+1;
                 IWMPMedia media = player.Ocx.currentMedia;