|
-
Dec 15th, 2001, 12:09 PM
#1
Thread Starter
Hyperactive Member
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 i = 1 To Picture1.ScaleHeight
For j = 1 To Picture1.ScaleWidth
pixval = Picture1.Point(j + Int(Rnd * 3), i + Int(Rnd * 3))
Picture1.PSet (j, i), 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.
-
Dec 15th, 2001, 01:04 PM
#2
Good Ol' Platypus
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)
-
Dec 15th, 2001, 01:11 PM
#3
Thread Starter
Hyperactive Member
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.
-
Dec 15th, 2001, 02:08 PM
#4
Good Ol' Platypus
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)
-
Dec 15th, 2001, 02:16 PM
#5
Thread Starter
Hyperactive Member
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.
-
Dec 15th, 2001, 02:18 PM
#6
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|