Deleting bitmap files after loading
-
How do you completely RELEASE a bitmap file if you load it as an image? The following code chokes: Picturebox1.Image = Image.FromFile("C:\test.bmp") 'load the file .... .... .... .... Picturebox1.Image = Nothing Picturebox1.Dispose Try deleting file here and you get “cannot delete…in use by another user…” error. ??? Thanks. Carp
-
How do you completely RELEASE a bitmap file if you load it as an image? The following code chokes: Picturebox1.Image = Image.FromFile("C:\test.bmp") 'load the file .... .... .... .... Picturebox1.Image = Nothing Picturebox1.Dispose Try deleting file here and you get “cannot delete…in use by another user…” error. ??? Thanks. Carp
-
Hello I Think you have to release the image. So try this: PictureBox1.Image.dispose PictureBox1.Image=Nothing Hope it helps