private static Rectangle GetWindowPlacement(IntPtr hWnd) { WindowSnap.RECT rect = default(WindowSnap.RECT); WindowSnap.GetWindowRect(hWnd, ref rect); return(rect); }
private static extern int GetWindowRect(IntPtr hWnd, ref WindowSnap.RECT rect);
private static Rectangle GetWindowPlacement(IntPtr hWnd) { WindowSnap.RECT rECT = new WindowSnap.RECT(); WindowSnap.GetWindowRect(hWnd, ref rECT); return(rECT); }