有没有一种方法来记录的屏幕,无论是台式机或窗口中,使用.NET技术。
Is there a way to record the screen, either desktop or window, using .NET technologies.
我的目标是免费的东西。我喜欢小,CPU占用率低,以及简单的想法,但会考虑其他选择,如果他们创造一个更好的最终产品。
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.
在简单地说,我知道如何在C#中的截图,但我将如何记录屏幕,或屏幕区,作为视频?
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!
推荐答案
有没有需要有一个第三方的DLL。这个简单的方法捕捉当前屏幕图像到.NET Bitmap对象。
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 :-).
相关推荐
最新文章