I am writing a image file to a stream and then add this to a picturebox using the following code:
The problem is that when I try to delete the file it gives me an error that the file is still in use. What I need to know is how I can release the image file.
Thanks in advance
Simon
Code:
Converts comment image in zip file to bmp
Dim bmp As New Bitmap(New System.IO.FileStream("C:\Orig.bmp", FileMode.Open, FileAccess.Read))
Me.pictureBox.Image = bmp
The problem is that when I try to delete the file it gives me an error that the file is still in use. What I need to know is how I can release the image file.
Thanks in advance
Simon