public static int GetWindowState(IntPtr hWnd) { WINDOWPLACEMENT placement = new WINDOWPLACEMENT(); placement.Length = Marshal.SizeOf(placement); ExternalDefs.GetWindowPlacement(hWnd, ref placement); return (int)placement.ShowCmd; }
public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);