Picture box

  • Thread starter Thread starter Aris
  • Start date Start date
A

Aris

I have an application that draws an image from a number of
points inside a picturebox.How can I capture the image
drawn in the picturebox and save it as a file like:

Bitmap.Save("image.jpg");

Thanks
 
Hello,

Aris said:
I have an application that draws an image from a number of
points inside a picturebox.How can I capture the image
drawn in the picturebox and save it as a file like:

Bitmap.Save("image.jpg");

Create a new 'Bitmap' object, get a 'Graphics' object for the bitmap using
'Graphics.FromImage', draw to the bitmap, assign the bitmap to the
PictureBox's 'Image' property or draw it onto the bitmap in its 'Paint'
event handler. Then you can save the bitmap by simply calling the 'Bitmap'
object's 'Save' method.
 
Back
Top