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
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