一尘不染

捕获活动窗口的屏幕截图?

c#

我正在制作一个屏幕捕获应用程序,一切都很好。我需要做的就是捕获活动窗口并为该活动窗口截图。有人知道我该怎么做吗?


阅读 287

收藏
2020-05-19

共1个答案

一尘不染

ScreenCapture sc = new ScreenCapture();
// capture entire screen, and save it to a file
Image img = sc.CaptureScreen();
// display image in a Picture control named imageDisplay
this.imageDisplay.Image = img;
// capture this window, and save it
sc.CaptureWindowToFile(this.Handle,"C:\\temp2.gif",ImageFormat.Gif);

http://www.developerfusion.com/code/4630/capture-a-screen-
shot/

2020-05-19