public static int getWindowHeight(IntPtr hwnd) { ScreenCapture.User32.RECT rct = new ScreenCapture.User32.RECT(); ScreenCapture.User32.GetClientRect(hwnd, ref rct); return(rct.bottom); }
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); }
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); }