Screen capture in Video Capture SDK .Net

Sample code

You can download sample project from GitHub

You can record both the entire screen and a specific area of it.

1. Create parameters class object and set the screen as a source.

ScreenCaptureSourceSettings settings = new ScreenCaptureSourceSettings(); 
settings.Mode = VFScreenCaptureMode.Screen;

2. Set area coordinates:

settings.FullScreen = false;

settings.Top = 0;
settings.Bottom = 1080;
settings.Left = 0;
settings.Right = 1920;
or record entire screen:
settings.FullScreen = true;

3. Set frame rate

settings.FrameRate = 25;

4. Capture mouse cursor

settings.GrabMouseCursor = true;

5. Apply screen capture settings

VideoCapture1.Screen_Capture_Source = screenSource;

6. Set preview mode

VideoCapture1.Mode = VFVideoCaptureMode.ScreenPreview;
or set capture mode, set default MP4 output settings
VideoCapture1.Mode = VFVideoCaptureMode.ScreenCapture;
VideoCapture1.Output_Format = new VFMP4Output();
VideoCapture1.Output_Filename = edOutput.Text;

7. Start.

VideoCapture1.Start();

Required redists

Please contact support to get help with this tutorial. Visit our GitHub page to get more code samples.
abstract 2abstract 1abstract 3
logo
VisioForge © 2006 - 2021