Screen source
Products: Video Capture SDK .Net
Screen capture is a process of copying what you see on your screen.
Video Capture SDK .Net allows you to capture the entire screen, a single window, or a selected area of the screen.
Capture screen area
To capture a screen area, use the ScreenCaptureSourceSettings
class.
// Set screen capture source settings
VideoCapture1.Screen_Capture_Source = new ScreenCaptureSourceSettings
{
FullScreen = false,
Left = 0,
Top = 0,
Width = 640,
Height = 480,
DisplayIndex = 0,
FrameRate = new VideoFrameRate(25),
AllowCaptureMouseCursor = true
};
Capture full screen
To capture the full screen, use the ScreenCaptureSourceSettings
class.
// Set screen capture source settings
VideoCapture1.Screen_Capture_Source = new ScreenCaptureSourceSettings
{
FullScreen = true,
DisplayIndex = 0,
FrameRate = new VideoFrameRate(25),
AllowCaptureMouseCursor = true
};
Capture window
To capture a window, use the ScreenCaptureSourceSettings
class.
// Set screen capture source settings
VideoCapture1.Screen_Capture_Source = new ScreenCaptureSourceSettings
{
FullScreen = false,
WindowHandle = windowHandle,
FrameRate = new VideoFrameRate(25),
AllowCaptureMouseCursor = true
};
To capture the mouse cursor, set the AllowCaptureMouseCursor
property to true
.
Use DisplayIndex
to select the display to capture. The default value is 0.
Use ScreenPreview or ScreenCapture mode to preview or capture video from the device.
Visit our GitHub page to get more code samples.