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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top