Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record Video of Screen using .NET technologies [closed]

Is there a way to record the screen, either desktop or window, using .NET technologies.

My goal is something free. I like the idea of small, low cpu usage, and simple, but would consider other options if they created a better final product.

In a nutshell, I know how to take a screenshot in C#, but how would I record the screen, or area of the screen, as a video?

Thanks a lot for your ideas and time!

like image 231
Chris Craft Avatar asked Dec 29 '08 14:12

Chris Craft


People also ask

How do you record a screen that is closed?

Use Record Video Background App Open the Google Play Store app and search for the Record Video Background app. Install the app and open it. Provide the necessary access privileges to the app. Tap on the Record button in the center to start recording the video in the background even if the screen is turned off.

Can a website block screen recording?

In the case of DRM provided by the client platform as below, recording can be reliably prevented without a separate solution. However, there are cases where it is not possible to prevent recording by applying multi-DRM alone. This is about web browsers with software-level Widevine DRM such as Chrome and Firefox.

How do I record a video that is running on my screen?

Click the Start Recording button or use the Win + Alt + R keyboard shortcut to capture your screen activity. Now perform whatever screen actions you want to capture.


1 Answers

There is no need for a third party DLL. This simple method captures the current screen image into a .NET Bitmap object.

    private Image CaptureScreen()
    {
        Rectangle screenSize = Screen.PrimaryScreen.Bounds;
        Bitmap target = new Bitmap(screenSize.Width,screenSize.Height);
        using(Graphics g = Graphics.FromImage(target))
        {
            g.CopyFromScreen(0,0,0,0,new Size(screenSize.Width,screenSize.Height));
        }
        return target;
    }

I am sure you can figure out how to capture a smaller portion of the screen, if that is needed :-).

like image 80
driis Avatar answered Sep 18 '22 08:09

driis