public static extern bool ClientToScreen(IntPtr hWnd, ref Win32Point lpPoint);
 public static extern IntPtr WindowFromPoint(Win32Point pt);
        // this accounts for the border and shadow. Serious fudgery here.
        private static Int32Rect GetWindowActualRect(IntPtr hWnd)
        {
            Win32Rect windowRect = new Win32Rect();
            Win32Rect clientRect = new Win32Rect();

            User32.GetWindowRect(hWnd, out windowRect);
            User32.GetClientRect(hWnd, out clientRect);

            int sideBorder = (windowRect.Width - clientRect.Width)/2 + 1;   

            // sooo, yeah.
            const int hackToAccountForShadow = 4;

            Win32Point topLeftPoint = new Win32Point(windowRect.Left - sideBorder, windowRect.Top - sideBorder);

            //User32.ClientToScreen(hWnd, ref topLeftPoint);

            Int32Rect actualRect = new Int32Rect(
                topLeftPoint.X, 
                topLeftPoint.Y,
                windowRect.Width + sideBorder * 2 + hackToAccountForShadow,
                windowRect.Height + sideBorder * 2 + hackToAccountForShadow);

            return actualRect;
        }