Saving the contents of a picturebox to a Bitmap file

How can I save the contents of a Picturebox at runtime into a bitmap file . I am using Visual basic 5.0 Enterprise Edition
abhimishraAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
cd74013Connect With a Mentor Commented:
You can save the clipboard with:

if clipboard.getdata(vbCFBitmap) then ' save if it has a bitmap
    savepicture clipboard.getdata(vbCFBitmap),"filename"
    end if


I find it odd that you cannot use save picture on the second picture box directly.  Does it save a white picture, a zero length file or give an error?
0
 
abhimishraAuthor Commented:
Someone please help me , I reaaly need this answer badly .
0
 
MikeP090797Commented:
Use SavePicture:
SavePicture Picture1.Picture, "C:\1.bmp"
0
 
abhimishraAuthor Commented:
I need to create thumbnails , so I am using the BITBLT API
call to create a reduced version of the image , the problem is
that when i transfer the scaled down version into a second picturebox
( which is to act as the thumbnail , and is small in size) ;
savepicture does not work on this BITBLTed image .
Is there any way to export the Clipboard to a file ... asuming the clipboard
contains BITMAP data
0
 
abhimishraAuthor Commented:
Thankyou for your answer .
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.