views:

25

answers:

2

Hi,

I have a .NET 3.5 Windows forms application. When the user keys in data and clicks 'Save', i want to save the entire form as an image file.

How can i do this ?

Thanks, Chak.

+1  A: 

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.

winSharp93
+1  A: 

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

adrianbanks