I have a ListView control and an ImageList control to be able to view pictures that are in a folder. I need to be able to select some or all of the pictures and either delete them or move them to another folder.
I can see them and I can select them, but when I try to actually delete them from the folder or move them to another folder I get an error message "cannot access the file because it is being used by another process".
I use a different form to view and select what picture files that I want to delete or move and save the names of these files in an array that I pass back to the main program. I then close and dispose of the imagelist, listview and form.
What could still be hanging onto these files and how do I get it to let go?
I can see them and I can select them, but when I try to actually delete them from the folder or move them to another folder I get an error message "cannot access the file because it is being used by another process".
I use a different form to view and select what picture files that I want to delete or move and save the names of these files in an array that I pass back to the main program. I then close and dispose of the imagelist, listview and form.
What could still be hanging onto these files and how do I get it to let go?