I am using the following to delete a file which is being displayed in a picturebox.
I keep getting an error message saying the file is in use by another process and cannot be deleted?
I have set the picturebox to nothing, I have set the bitmap used to fill the picturebox to nothing and even set the FileInfo() object which holds the file name to nothing and still get the error????
Where am I going wrong?
Thnx
Code:
File.Delete(strFileName)
I keep getting an error message saying the file is in use by another process and cannot be deleted?
I have set the picturebox to nothing, I have set the bitmap used to fill the picturebox to nothing and even set the FileInfo() object which holds the file name to nothing and still get the error????
Where am I going wrong?
Thnx