[Resolved] SavePicture Everything on Picture1
Okay, I have a Picture on Picture1.picture. I also have another picture on top of it called Picture5.picture. When I do a PictureSave, I would like to have everything on Picture1 to be saved with it. This isn't working though, it just saves the picture on Picture1 and ignores anything else.
Thanks!
Chris
Added green "resolved" checkmark - Hack
Re: PictureSave Everything on Picture1
Post what you are doing to save the first picture.
Do you want to save both pictures to different files, and load them back in again when your program starts?
Re: PictureSave Everything on Picture1
VB Code:
Dim pic As StdPicture
Set pic = LoadPicture(filedir & filename)
With Picture1
.PaintPicture pic, 40, 40
.Picture = .Image
Picture5.Picture = Picture5.Image
SavePicture Picture1.Image, filedir & "\test1.bmp"
End With
Really, I am not doing anything drastic. I have Picture5.Picture already start up with a graphic in it and AutoRedraw on too. Same with Picture1.Picture. When I save, it just has Picture1.Picture and not anything else.
I actually want to save both pictures to the same file because Picture5 is on top of Picture1.
Chris
... I just realized my dyslexia is kicking in this morning and had "PictureSave" and not "SavePicture". That should clear up some issues.
Re: SavePicture Everything on Picture1
You are doing a With/End With on Picture1 so it is going to ignore Picture5 simply because Picture5 is not a property or method of Picture1. So, if you need to save both (and I'm not sure you can get both in the same file. Test it out to see what happens), then I would do something like
VB Code:
With Picture1
.PaintPicture pic, 40, 40
.Picture = .Image
SavePicture .Image, filedir & "\test1.bmp"
End With
Picture5.Picture = Picture5.Image
SavePicture Picture5.Image, filedir & "\test1.bmp"
Re: SavePicture Everything on Picture1
Okay, that's a nogo. It just saves Picture5 then and no Picture1. There has to be a way to save Picture1 and Picture5 on top of eachother. I mean, it's on top of eachother on the Picture1.Picture. If you can save text or anything else that is over it, it should save a Picture on top of it too...
Chris
1 Attachment(s)
Re: SavePicture Everything on Picture1
Here... I think this is what you're looking for...
Took me about 3 mins to create...lol...
I figured you wouldn't understand what to do if I told you... so I created a working sample...
Hopefully this is what you need...
Re: SavePicture Everything on Picture1
Aww, that insults my intelligence. But yet, I don't feel insulted with this gift. Kudos! Great code my friend!
Chris
Re: [Resolved] SavePicture Everything on Picture1
So I take it my code was what you needed? :blush:
Even the simplest things take time to register...
Re: [Resolved] SavePicture Everything on Picture1
Yes, of course, you did great. :)
Chris