How to delete a file which is in use/open by some process in runtime. I am using vb.net for my project and a image is shown in picturebox, and that should be deleted, without cl
I don't think that it is possible. On windows, you cannot delete a file which has open handles. http://support.microsoft.com/kb/320081
However, from your description you don't need to keep the file open in your application. Open the file, read the image then close the file. Then the file can be deleted but the application will still have the image data.