Skip to content

Commit

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

public static void RestoreWindow(WindowInfo windowInfo)
{
SendMessage(windowInfo.Handle, WM_SYSCOMMAND, SC_RESTORE, IntPtr.Zero);
}
private static bool IsWindowVisible(IntPtr hWnd)
{
return IsWindowVisibleCore(hWnd) && !IsIconic(hWnd);
Expand Down

0 comments on commit 68a875c

Please sign in to comment.