public Image Capture(Rectangle r, IntPtr handle, bool captureCursor) { if (handle.ToInt32() > 0) { Rectangle rect; if (CaptureClientArea) { rect = NativeMethods.GetClientRect(handle); } else { rect = CaptureHelpers.GetWindowRectangle(handle); } bool isTaskbarHide = false; try { if (AutoHideTaskbar) { isTaskbarHide = NativeMethods.SetTaskbarVisibilityIfIntersect(false, rect); } return(TypeRectangle.Capture(rect)); } finally { if (isTaskbarHide) { NativeMethods.SetTaskbarVisibility(true); } } } return(null); }
internal static Image Capture(Rectangle bounds) { TypeRectangle tr = new TypeRectangle(); return(tr.Capture(bounds, new IntPtr(0), false)); }
public Image Capture(Rectangle r, IntPtr handle, bool captureCursor) { Rectangle bounds = CaptureHelpers.GetScreenBounds(); return(TypeRectangle.Capture(bounds)); }