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?
Asked
Active
Viewed 758 times
0
-
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 Answers
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.