-
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?:confused:
-
Save the PictureBox's .Image property. I think that will work.
-
Tried
I already tried that, it didn't work. It seems like .image is the same as .picture
-
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.
-
Yehhhhhhhh!!!
Thank you so much!!!!!!!!!!!!!!!!!!!!! Tt works!!!!!!!!!!!!!!!
And now when ever the picture gets covered up by something, it won't reset!!!!!!!! Yes!!!!!!!!!!!!!!!!!!!!
-
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!