Results 1 to 6 of 6

Thread: Ahhhhhhhhhhh

  1. #1

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    Exclamation Ahhhhhhhhhhh

    How can i save what a picturebox is showing? Here is some of my code:

    PHP Code:
    Private Sub mdiffuse_Click()
    Form2.Caption "VB Effect App-Working..."
        
    For 1 To Picture1.ScaleHeight
            
    For 1 To Picture1.ScaleWidth
            pixval 
    Picture1.Point(Int(Rnd 3), Int(Rnd 3))
            
    Picture1.PSet (ji), pixval
            Next j
        Next i
    Form2
    .Caption "VB Effect App" 
    When it does that, it fills the picturebox with points. When i try to save it useing:

    savepicture picture1, ("C:\MyImage.jpg")

    It only saves the picture source, not the points. Is it possible to make it save what the picturebox is showing?
    My monkey wearing the fedora points and laughs at you.

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Save the PictureBox's .Image property. I think that will work.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    Thumbs down Tried

    I already tried that, it didn't work. It seems like .image is the same as .picture
    My monkey wearing the fedora points and laughs at you.

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Hmmm... Try setting AutoRedraw to whatever it isn't Then try it again. If all else fails, put a .Refresh before you save the .Image.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5

    Thread Starter
    Hyperactive Member Arrow_Raider's Avatar
    Join Date
    Dec 2001
    Location
    AVR Lovers Club
    Posts
    423

    Talking Yehhhhhhhh!!!

    Thank you so much!!!!!!!!!!!!!!!!!!!!! Tt works!!!!!!!!!!!!!!!
    And now when ever the picture gets covered up by something, it won't reset!!!!!!!! Yes!!!!!!!!!!!!!!!!!!!!
    My monkey wearing the fedora points and laughs at you.

  6. #6
    Addicted Member
    Join Date
    Dec 2001
    Location
    Great White North, ey?
    Posts
    202

    Here is another easy way

    Private Sub Picture1_Click()
    Picture1.Picture = Picture1.Image
    SavePicture Picture1.Picture, App.Path & "\pic.bmp"
    End Sub

    works for me every time!

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