Uncas.Core by Ole Lynge Soerensen

<PackageReference Include="Uncas.Core" Version="1.1.0.154" />

 IScreenCapture

public interface IScreenCapture
Provides functions to capture the entire screen, or a particular window, and save it to a file.

Captures the foreground window.

Creates an Image object containing a screen shot of the entire desktop.

void CaptureScreenToFile(string fileName, ImageFormat format)

Captures a screen shot of the entire desktop, and saves it to a file.

Image CaptureWindow(IntPtr handle)

Creates an Image object containing a screen shot of a specific window.

void CaptureWindowToFile(IntPtr handle, string fileName, ImageFormat format)

Captures a screen shot of a specific window, and saves it to a file.