/// <summary> /// Reset Handling Windows Pointer /// </summary> /// <param name="hWnd">current Handling Windows Pointer</param> public void ResetHandlingPointer(IntPtr hWnd) { HandlingPtr = hWnd; // If hWnd is not Zero, just set HandlingPtr if (hWnd != IntPtr.Zero) { return; } // If hWnd is Zero, just consider as Full Screen Capture Rectangle windRtg = CaptureHelper.GetWindowCoordinate(hWnd); ContentSetting(this, windRtg.Width, windRtg.Height); }
/// <summary> /// Create Screen Capture /// </summary> /// <param name="hWnd">Handling Windows Pointer</param> /// <returns></returns> public static ScreenCapture Create(IntPtr hWnd) { ScreenCapture sc = new ScreenCapture { HandlingPtr = hWnd, }; // If hWnd is not Zero, just set HandlingPtr if (hWnd != IntPtr.Zero) { return(sc); } // If hWnd is Zero, just consider as Full Screen Capture Rectangle windRtg = CaptureHelper.GetWindowCoordinate(hWnd); ContentSetting(sc, windRtg.Width, windRtg.Height); return(sc); }