Skip to content

Commit

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

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

0 comments on commit daf8450

Please sign in to comment.