"Crirus" <Cr****@datagroup.ro> scripsit:
I have apicturebox painted in it's paint event.
I need a way to save the image created. Image obj of my picturebox is
Nothing. How to output to a jpg my image?
Draw the image onto a bitmap instead. Create a new 'Bitmap' object with
the preferred size ('Dim b As New Bitmap(...)'), then obtain a
'Graphics' handle ('Graphics.FromImage') and draw onto the bitmap. Then
you can draw the bitmap to the picturebox in its 'Paint' event handler.
You can save the image by calling 'b''s 'Save' method. Don't forget to
call the 'Graphics'' object's 'Dispose' method after you finish using it.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>