G
Guest
When I run my program, I open a picturebox with a photo loaded in to it using
the code:
PictureBox1.Image = Image.FromFile(strPath & strImage).
I then close the picture box and put in the line:
PictureBox1.Dispose()
and it still will not let me delete the file which the photo is located. It
gives me the in use error message. I need to be able to delete the photo
without closing the program. Can anyone help?
the code:
PictureBox1.Image = Image.FromFile(strPath & strImage).
I then close the picture box and put in the line:
PictureBox1.Dispose()
and it still will not let me delete the file which the photo is located. It
gives me the in use error message. I need to be able to delete the photo
without closing the program. Can anyone help?