ScreenCapturer 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ScreenCapturer --version 2.0.0                
NuGet\Install-Package ScreenCapturer -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ScreenCapturer" Version="2.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ScreenCapturer --version 2.0.0                
#r "nuget: ScreenCapturer, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ScreenCapturer as a Cake Addin
#addin nuget:?package=ScreenCapturer&version=2.0.0

// Install ScreenCapturer as a Cake Tool
#tool nuget:?package=ScreenCapturer&version=2.0.0                

Usage

All methods, events and properties can be accessed using static ScreenCapturer class.

Methods

StartCapture — starts capture and callback threads.

StopCapturing — asynchronously stops capture and callback threads.

Events

OnScreenUpdated — dispatched when screen snapshot was made, additional info in notes.

OnCaptureStop — dispatched when capture is stopped manually or because of exception.

Flags and options

SkipFirstFrame — if flag is set to true (default) then first captured screen snapshot gets skipped and no callbacks called (for some unknown reason it is a black screen, apparently SharpDX related issue).

SkipFrames — if flag is set to true (default) and snapshot queue size gets over than 2 bitmaps then oldest bitmaps get removed.

PreserveBitmap — if flag is set to false (default) then after callbacks were executed bitmap gets disposed automatically.

IsActive — read-only property that indicates that capture is active (it can be starting, in progress or going to be stopped).

IsNotActive — read-only property that indicated that capture is not active (opposite to IsActive).

Notes

You can set callback by passing action as argument to StartCapture or set it as standard event callback using OnScreenUpdated. StopCapturing will stop capture as fast as possible, however method will return immediately to minimize deadlock possibility.

Use OnCaptureStop event if you need to perform actions after capture was really stopped. If capture process gets interrupted by exception (SharpDX exception in capture thread or exception in any of capture callbacks in callback thread) and OnCaptureStop event has assigned callback — it will be called with exception as argument (might be useful if resolution gets changed and etc.), otherwise regular exception will be thrown.

Possible issues

If capture gets often interrupted by SharpDX exceptions small memory leaks may occur, though it's should be unnoticable in most cases and can be ignored.

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.1 3,878 2/23/2023
3.0.0 1,683 10/21/2021
2.0.0 1,098 8/9/2020
1.0.4 5,210 4/25/2020
1.0.3 913 10/6/2019
1.0.2 533 9/19/2019
1.0.1 491 9/19/2019
1.0.0 570 9/19/2019