1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-23 12:15:48 +02:00

Tweak video player UI handling

This commit is contained in:
chylex 2017-08-11 11:32:20 +02:00
parent f231256402
commit 54d12686af
2 changed files with 4 additions and 1 deletions

View File

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

View File

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