Click to See Complete Forum and Search --> : SavePicture fails to save


webnetworks
September 13th, 2001, 11:08 AM
Hi,

I have an appl. that save an image from a Picture control. From one moment to another the SavePicture command fails to save Bitmaps from the Picture Control.

Nothing changed to this part of the appl. but now I get only a grey (appl.background color) image as .BMP file.

The code used is:

sFile = "C:\MYIMAGE.BMP"
SavePicture Picture1.Image, sFile




What went wrong and how can I solve this problem. I tried the compiled code on another PC and that also doesn't work corrcetly.


Thanks,

Jeroen.

shree
September 13th, 2001, 11:56 AM
Maybe the Autoredraw property of your picturebox is false. Set it to true.

webnetworks
September 14th, 2001, 01:25 AM
Thanks,

That solved the problem, strange things worked fine for a while and suddenly it went wrong (after changing the capture source from Windows Media Player to VidCap32 content).

Anyway, everything works fine now.


Regards,

Jeroen.

webnetworks
September 17th, 2001, 03:27 AM
After having saved the image every 30 secs. for about 1600 times, the size of the file becomes 0 bytes!!!

After restarting the application, all works fine for about 1600 times. The captured image is OK, the saved one is empty....


HELP!!!!!!


Jeroen.

shree
September 17th, 2001, 05:07 AM
Not clear why, but you can try this:


sFile = "C:\MYIMAGE.BMP"
If Dir$(sFile) <>"" then Kill sFile
SavePicture Picture1.Image, sFile