How to create BMP file from PictureBox

How to create BMP file from PictureBox

Post by Alex Karchevs » Fri, 21 Nov 1997 04:00:00



Hi everybody.

Please help me to solve my problem.

I have combination of images and text in PictureBox (Picture1).
How to save Picture1.Picture in BMP file?

Thank you.

 
 
 

How to create BMP file from PictureBox

Post by Kurt Cagl » Fri, 21 Nov 1997 04:00:00


Alex,

In VB5 you have the SavePicture method, which takes an Image or Picture
control and a path as parameters:

SavePicture Picture1,"c:/myPath/myfile.bmp"

For picture boxes, it will save to BMP, ICO, WMF and enhanced metafile
format, but it will only save to BMP format for Image controls.

Kurt Cagle
Editor, Cagle Communications


> Hi everybody.

> Please help me to solve my problem.

> I have combination of images and text in PictureBox (Picture1).
> How to save Picture1.Picture in BMP file?

> Thank you.


 
 
 

How to create BMP file from PictureBox

Post by Bart Late » Sat, 22 Nov 1997 04:00:00



>I have combination of images and text in PictureBox (Picture1).
>How to save Picture1.Picture in BMP file?

You mean you have a picture where you printed some text on, and you want
to save the resulting image?

Use savepicture on the Image property.

Unfortunately, this will only work on a picture box with autoredraw =
True. If that isn't an option, e.g. it makes interactive drawing
impossible, the use bitblt to make a copy onto a (hidden) picture box
with autoredraw = true. Don't forget to copy the palette first.

HTH,
Bart.