Results 1 to 9 of 9

Thread: [Resolved] SavePicture Everything on Picture1

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    44

    Resolved [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
    Last edited by Hack; Dec 20th, 2005 at 09:35 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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?

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    44

    Re: PictureSave Everything on Picture1

    VB Code:
    1. Dim pic As StdPicture
    2. Set pic = LoadPicture(filedir & filename)
    3.  
    4. With Picture1
    5.     .PaintPicture pic, 40, 40
    6.     .Picture = .Image
    7.     Picture5.Picture = Picture5.Image
    8.     SavePicture Picture1.Image, filedir & "\test1.bmp"
    9. 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.
    Last edited by Kilokahn; Dec 20th, 2005 at 08:26 AM.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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:
    1. With Picture1
    2.     .PaintPicture pic, 40, 40
    3.     .Picture = .Image
    4.     SavePicture .Image, filedir & "\test1.bmp"
    5. End With
    6.  Picture5.Picture = Picture5.Image
    7.  SavePicture Picture5.Image, filedir & "\test1.bmp"

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    44

    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

  6. #6
    Hyperactive Member
    Join Date
    Feb 2003
    Location
    Grenada
    Posts
    346

    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...
    Attached Files Attached Files
    If my post has been helpful, then please rate it accordingly...
    If it has solved your question(s), then don't forget to mark the thread as "[Resolved]"... thank you.

  7. #7

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    44

    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

  8. #8
    Hyperactive Member
    Join Date
    Feb 2003
    Location
    Grenada
    Posts
    346

    Re: [Resolved] SavePicture Everything on Picture1

    So I take it my code was what you needed?

    Even the simplest things take time to register...
    If my post has been helpful, then please rate it accordingly...
    If it has solved your question(s), then don't forget to mark the thread as "[Resolved]"... thank you.

  9. #9

    Thread Starter
    Member
    Join Date
    Oct 2005
    Posts
    44

    Re: [Resolved] SavePicture Everything on Picture1

    Yes, of course, you did great.

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width