I am working on a vb.net windows application. (windows 2000 / .net 1.1)
The application dynamically creates a picturebox and loads a picture into it from disk. Then after a couple of seconds the app needs to delete it.
However, when I try to delete the file I get this error:
An unhandled exception of type 'System.IO.IOException' occurred in microsoft.visualbasic.dll
Additional information: The process cannot access the file "C:\test.Png" because it is being used by another process.
But the only process that could be using it is the app itself.
I've also tried this to no avail: