Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27046

PictureBox in VB.net - Save JPG After

$
0
0
I want to display an image in a picturebox and later save it....



Dim img As Image

Using str As Stream = File.OpenRead("c:\temp.jpg")
img = Image.FromStream(str)
End Using

Pbgd.Image = img


' later in aonther routing
' this causes an error

pbgd.save("c:\temp2.jpg")


' I have found that if I use pbgd.load("c:\temp.jpg") then it allows me to save it
' but using the load method locks the file.... very frustrating

Viewing all articles
Browse latest Browse all 27046

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>