create file from picturebox control

create file from picturebox control

Post by Daniel Browe » Fri, 09 Feb 2001 00:11:08



How do I create a bitmap file from the image in a picturebox control?

Daniel Brower

 
 
 

create file from picturebox control

Post by Raul M. Fragos » Fri, 09 Feb 2001 00:32:23


Hi,

Assuming your PictureBox's name is Picture1, you can use the following code:

SavePicture Picture1.Picture, "c:\mypicture.bmp"

Hope this help.

Raul M. Fragoso


> How do I create a bitmap file from the image in a picturebox control?

> Daniel Brower



 
 
 

create file from picturebox control

Post by Gary » Fri, 09 Feb 2001 21:46:44


Hi Daniel,

Implement the IPicture interface in Visual Basic, and use the SaveAsFile
method. Note:  IPicture requires a reference to "Standard OLE Types" (
Project->Reference).

Dim b As IPicture
Set b = Picture2.Picture
.....

Best Regards,

 
 
 

create file from picturebox control

Post by Gary » Sat, 10 Feb 2001 12:20:00


Hi Daniel,

Here is another simple method to implement your task,

SavePicture Picture1.Image, App.Path + "\test.bmp"

Please test it.

Best Regards,