开发者

How can i save the screen as an image from a .NET forms application in C#

I have a .NET 3.5 Windows forms application. When the user keys in data and clicks 'Save', i 开发者_如何学Cwant to save the entire form as an image file.

How can i do this ?

Thanks, Chak.


Have a look at my answer on this question. It shows how to take a screenshot of the whole screen.


You can create a bitmap in size of your screen (System.Windows.Forms.Screen class), create a System.Drawing.Graphics object for it (Graphics.FromImage) and then use Graphics.CopyFromScreen.

You may ve also able to use Form.DrawToBitmap.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜