OK, I am loading a jpg into a picture box using...
I then clear the image...Code:picturebox.image = image.fromfile("temp.jpg")
I now want to delete the file "temp.jpg" but I get an exception stating that the file is currently in use. Im guessing that the object created by system.image.fromfile() still has its grasp on the file I want to delete. How do I get it to let go. Disposing of the picturebox control doesn't help. I have no way of referencing the object created by the system, (or at least that I know of...) any ideas. Thanks.Code:picturebox.image = Nothing
-scuz


Reply With Quote