0

Windows Form that I wanted to save As Image

Is it possible to actually save this windows form as image? like when the user clicked the save as image? If yes, Is it okay to provide me codes for this? Thank you.

Raniel Quirante
  • 315
  • 2
  • 15

1 Answers1

3

First of all there will not be anyone providing code for you here.only guidance or some light to your solution will be given.

So as a light to the solution,look at this method supported by .NET.

Control.DrawBitmap method

you can use the method like :

 Dim frm = Form.ActiveForm
Using bmp = New Bitmap(frm.Width, frm.Height)
    frm.DrawToBitmap(bmp, New Rectangle(0, 0, bmp.Width, bmp.Height))
    bmp.Save("c:\temp\screenshot.png")
End Using

hope this provided a small input to the solution.

akhil kumar
  • 1,598
  • 1
  • 13
  • 26