PDA

Click to See Complete Forum and Search --> : PictureBox, Text & Saving


jkurpias
Nov 16th, 1999, 03:48 AM
I just don't get it?!?!
I have a picturebox called PicBox. The following code doesn't save the SAMPLE.

PicBox.Picture = LoadPicture(App.Path & _ "\temp.bmp")
PicBox.AutoRedraw = True
PicBox.Print "SAMPLE"
SavePicture PicBox, App.Path & "\temp.bmp"

What's wrong...please!

Aaron Young
Nov 16th, 1999, 03:56 AM
the Picture Property doesn't change, when you Print or Draw on the Picturebox using the Line or PSet Methods you are updating the Image, so you can either:

PicBox.Picture = LoadPicture(App.Path & _ "\temp.bmp")
PicBox.AutoRedraw = True
PicBox.Print "SAMPLE"
SavePicture PicBox.Image, App.Path & "\temp.bmp"

Or Force the Picture to Update, e.g.
Picture1 = Picture1.Image

PicBox.Picture = LoadPicture(App.Path & _ "\temp.bmp")
PicBox.AutoRedraw = True
PicBox.Print "SAMPLE"
PicBox = PicBox.Image
SavePicture PicBox, App.Path & "\temp.bmp"


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