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.
精彩评论