From MSDN :
The file remains locked until the Image is disposed.
Do that instead :
Dim xx as Image
Using str As Stream = File.OpenRead(Fileloc)
xx = Image.FromStream(str)
End Using
picturebox.Image = xx
The file is closed after the image is loaded, so you can delete the file if you need to
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |