Release image file on button click.
I have a picture box in which I add image. In button click event I set image property of picturebox to null. Now I want to release the handle to the file and delete it. How to do this. When I try to delete, it gives error file is used by another process?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Kailash Polai195 reputationPosted Jul 8, 2015, 10:07 PM EDT
Ranjit PowarRank #553 · 4.4K reputationPosted Jul 8, 2015, 10:53 PM EDT
Ranjit PowarRank #553 · 4.4K reputationPosted Jul 8, 2015, 11:05 PM EDT