ListView and delete file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I have a listview with images, and when I select one image I can delete the image, bu
I produce an error, say "the process cannot access the file D:\imagesDicomitzador\142617379\image1.bmp because it is being used by another process", What
is the problem? I user for delete de file IO.File.Delete("D:\imgesDicomitzador\142617379\image1.bmp"

Thank

Silvia
 
Hi,

Silvia, I only readed this in one of this dotnet newsgroups, as long as a
picture is in a picturebox it has a connection to that, and I think that
therefore you have first to really delete first from that picturebox.

I hope this helps?

Cor
 
Hi

Yes I have the image in the picture box but firt delete file I do picturebox.Image=nothing, and the error its the same

Thanks
 
Back
Top