0

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.

Chakra
  • 2,525
  • 8
  • 43
  • 82

2 Answers2

1

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.

Matthias
  • 12,053
  • 4
  • 49
  • 91
1

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

Community
  • 1
  • 1
adrianbanks
  • 81,306
  • 22
  • 176
  • 206