Skip to content

Commit

Permalink
Added the possibility to minimize windows (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Sep 30, 2023
1 parent 68a875c commit 088daa4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions PeyrSharp.UiHelpers/WindowHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ public static void RestoreWindow(WindowInfo windowInfo)
{
SendMessage(windowInfo.Handle, WM_SYSCOMMAND, SC_RESTORE, IntPtr.Zero);
}

public static void MinimizeWindow(WindowInfo windowInfo)
{
SendMessage(windowInfo.Handle, WM_SYSCOMMAND, SC_MINIMIZE, IntPtr.Zero);
}

private static bool IsWindowVisible(IntPtr hWnd)
{
return IsWindowVisibleCore(hWnd) && !IsIconic(hWnd);
Expand Down

0 comments on commit 088daa4

Please sign in to comment.