Esempio 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();
 }
Esempio n. 2
0
 public static void SetPlacement (Window d, WINDOWPLACEMENT value)
 {
     d.SetValue(PlacementProperty, value);
 }
Esempio 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();
 }
Esempio n. 4
0
 private static extern bool GetWindowPlacement (IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);