diff --git a/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.Designer.cs b/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.Designer.cs index 0459d30..8d45eb6 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.Designer.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.Designer.cs @@ -151,7 +151,6 @@ namespace PersistentWindows.Common this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; this.KeyPreview = true; this.MaximizeBox = false; - this.MinimizeBox = false; this.Name = "HotKeyWindow"; this.Opacity = 0.5D; this.ShowInTaskbar = false; diff --git a/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs b/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs index 4ce3fc8..3b3405a 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/HotKeyWindow.cs @@ -57,6 +57,7 @@ namespace PersistentWindows.Common MouseWheel += new MouseEventHandler(FormMouseWheel); FormClosing += new FormClosingEventHandler(FormClose); MouseLeave += new EventHandler(FormMouseLeave); + SizeChanged += new EventHandler(FormSizeChanged); Icon = PersistentWindowProcessor.icon; @@ -827,5 +828,15 @@ namespace PersistentWindows.Common 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; + } + } } }