Exemplo n.º 1
0
 public static bool WindowIsFullscreen(IntPtr window)
 {
     var placement = new WINDOWPLACEMENT();
     placement.length = Marshal.SizeOf(placement);
     UnsafeNativeMethods.GetWindowPlacement(window, ref placement);
     var workarea = SystemParameters.WorkArea;
     string cname = GetClassName(window);
     // ReSharper disable once CompareOfFloatsByEqualityOperator
     return ((placement.showCmd == 1 && placement.minPosition.X == -1 && placement.minPosition.Y == -1 && placement.normalPosition.left == 0 && placement.normalPosition.top == 0 && placement.normalPosition.Width == workarea.Width && !(cname == "Progman" || cname == "WorkerW")));
 }
Exemplo n.º 2
0
 internal static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);