Exemplo n.º 1
0
 /// <summary>Retrieves the show state and the restored, minimized, and maximized positions of the specified window.</summary>
 public static WINDOWPLACEMENT GetWindowPlacement (this Window window)
 {
     var place = new WINDOWPLACEMENT { Length = Marshal.SizeOf(typeof(WINDOWPLACEMENT)) };
     if (GetWindowPlacement(GetHandle(window), ref place))
         return place;
     else
         throw new Win32Exception();
 }
Exemplo n.º 2
0
 public static void SetPlacement (Window d, WINDOWPLACEMENT value)
 {
     d.SetValue(PlacementProperty, value);
 }
Exemplo n.º 3
0
 /// <summary>Sets the show state and the restored, minimized, and maximized positions of the specified window.</summary>
 public static void SetWindowPlacement (this Window window, WINDOWPLACEMENT place)
 {
     place.Length = Marshal.SizeOf(typeof(WINDOWPLACEMENT));
     if (!SetWindowPlacement(GetHandle(window), ref place))
         throw new Win32Exception();
 }
Exemplo n.º 4
0
 private static extern bool GetWindowPlacement (IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);