I have this code:
Dim xx as image
xx = image.fromfile(Fileloc)
picturebox.image = xx
And i can't delete the file even though I've loaded it into a picture box. If I add this line:
xx.dispose
the picture box becomes a big red X.
I only want to delete the images when my application is closing (they are temp files). So shall I just dispose them before I delete them?