0

How would I create an application that records the users interactions with the desktop in C# and then convert it to a video format such as avi?

Cœur
  • 37,241
  • 25
  • 195
  • 267
RV.
  • 2,782
  • 8
  • 39
  • 51
  • Does this answer your question? [How to capture screen to be video using C# .Net?](https://stackoverflow.com/questions/4068414/how-to-capture-screen-to-be-video-using-c-sharp-net) – misticos Dec 04 '19 at 15:32

1 Answers1

0

To capture screenshots you can use CopyFromScreen.

Simple C# example:

Rectangle bounds = Screen.GetBounds(Point.Empty);
using(Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
{
    using(Graphics g = Graphics.FromImage(bitmap))
    {
         g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
    }

    // TODO: Save or use in any other way.
}

However, if you want to capture videos, it would be better to use something like this Stack Overflow question.

Cœur
  • 37,241
  • 25
  • 195
  • 267
misticos
  • 718
  • 5
  • 22