Example #1
0
        public static int getWindowHeight(IntPtr hwnd)
        {
            ScreenCapture.User32.RECT rct = new ScreenCapture.User32.RECT();
            ScreenCapture.User32.GetClientRect(hwnd, ref rct);

            return(rct.bottom);
        }
Example #2
0
        public static int getWindowWidth(IntPtr hwnd)
        {
            ScreenCapture.User32.RECT cientRect = new ScreenCapture.User32.RECT();
            ScreenCapture.User32.GetClientRect(hwnd, ref cientRect);

            ScreenCapture.User32.RECT windowRect = new ScreenCapture.User32.RECT();
            ScreenCapture.User32.GetWindowRect(hwnd, ref windowRect);

            return(cientRect.right);
        }
Example #3
0
        public static int getClientWindowHeight(IntPtr firefoxHwnd)
        {
            if (firefoxHwnd == IntPtr.Zero)
            {
                return(-1);
            }

            ScreenCapture.User32.RECT rct = new ScreenCapture.User32.RECT();
            ScreenCapture.User32.GetClientRect(firefoxHwnd, ref rct);

            return(rct.bottom);
        }