Results 1 to 8 of 8

Thread: images in memory...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    17

    images in memory...

    Ok I can LOAD a picture into memory, and i can even stretchblt or bitblt to a picturebox. However, I can't figure out how to make a seperate stdpicture2 accept the result of the resized stdpicture1. I know it has to do with setting up stdpicture2 right to accept it somehow. Basicly my design is this:

    1 picture to load the picture file.
    1 picture to hold the result of Stretchblt of the first picture
    Save picture #2 to a file.

  2. #2
    Addicted Member Janus's Avatar
    Join Date
    Aug 2001
    Location
    California
    Posts
    221
    StretchBlt the Picture to a PictureBox, and then use the PictureBox's .Image property as your new picture object.
    "1 4m 4 1337 #4xz0r!'
    Janus

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    17

    ...

    Ok I can transfer it, but I still can't save it correctly. It turns up with the background of the picturebox rather than the bitblt section.

  4. #4
    Addicted Member Janus's Avatar
    Join Date
    Aug 2001
    Location
    California
    Posts
    221
    Play with the AutoRedraw property and the Refresh method, see what combination you need to save it properly.
    "1 4m 4 1337 #4xz0r!'
    Janus

  5. #5
    SirK
    Guest
    Could you provide an example of how it works for you Janus? Is it only a Windows 2000 versus Windows ME/ 98/ 95 ? hmm....

    ~SirK

  6. #6
    Addicted Member Janus's Avatar
    Join Date
    Aug 2001
    Location
    California
    Posts
    221
    I usually do this:

    PictureBox.AutoRedraw = True
    ' Draw stuff
    PictureBox.Refresh
    "1 4m 4 1337 #4xz0r!'
    Janus

  7. #7
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    That is the best way to do it, as Janus mentioned.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  8. #8
    SirK
    Guest
    Thanks guys...I finally got it to work. For some reason when I would have the DC in memory and then try to delete it afterwards, it would display the picture. ?? Weird...but thanks though.

    ~SirK

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