mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 04:55:39 +02:00
add minimize button to hotkey window
This commit is contained in:
parent
4c2cde17d5
commit
963d0bad24
2 changed files with 11 additions and 1 deletions
|
@ -151,7 +151,6 @@ namespace PersistentWindows.Common
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||||
this.KeyPreview = true;
|
this.KeyPreview = true;
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.Name = "HotKeyWindow";
|
this.Name = "HotKeyWindow";
|
||||||
this.Opacity = 0.5D;
|
this.Opacity = 0.5D;
|
||||||
this.ShowInTaskbar = false;
|
this.ShowInTaskbar = false;
|
||||||
|
|
|
@ -57,6 +57,7 @@ namespace PersistentWindows.Common
|
||||||
MouseWheel += new MouseEventHandler(FormMouseWheel);
|
MouseWheel += new MouseEventHandler(FormMouseWheel);
|
||||||
FormClosing += new FormClosingEventHandler(FormClose);
|
FormClosing += new FormClosingEventHandler(FormClose);
|
||||||
MouseLeave += new EventHandler(FormMouseLeave);
|
MouseLeave += new EventHandler(FormMouseLeave);
|
||||||
|
SizeChanged += new EventHandler(FormSizeChanged);
|
||||||
|
|
||||||
Icon = PersistentWindowProcessor.icon;
|
Icon = PersistentWindowProcessor.icon;
|
||||||
|
|
||||||
|
@ -827,5 +828,15 @@ namespace PersistentWindows.Common
|
||||||
return PersistentWindowProcessor.GetForegroundWindow();
|
return PersistentWindowProcessor.GetForegroundWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FormSizeChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (WindowState == FormWindowState.Minimized)
|
||||||
|
{
|
||||||
|
//User32.ShowWindow(handle, (int)ShowWindowCommands.Normal);
|
||||||
|
WindowState = FormWindowState.Normal;
|
||||||
|
ToggleWindowSize();
|
||||||
|
Visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue