PDA

Click to See Complete Forum and Search --> : picture ctrl- stretch property- save as a bitmap


Dec 15th, 1999, 05:24 AM
The pictureBox control is supposed to be better than the image control but I actually need the stretch property of the image ctrl.
How can I do to have the content of a picture ctrl (bitmap) to fit the picture control dimensions?

If not possible, how can I save as a bitmap the content of an image ctrl as I see it

e.g : image ctrl stretch prop set to true and width is X after loading a bitmap

if I make X = 2X , i've got a new display; how can i save the "new" image/display on disk as a bimap of width = 2X ?


thank you for any info

Aaron Young
Dec 16th, 1999, 02:04 AM
Add a Picturebox and a Command Button to a Form, Load a Picture into the Picturebox, make the Picturebox the Size you want the Image to be..

Private Sub Command1_Click()
With Picture1
.AutoRedraw = True
.PaintPicture .Picture, 0, 0, .ScaleWidth, .ScaleHeight, 0, 0, ScaleX(.Picture.Width, vbHimetric, vbTwips), ScaleY(.Picture.Height, vbHimetric, vbTwips)
.Picture = .Image
End With
SavePicture Picture1.Picture, "C:\Large.bmp"
End Sub


------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net