When loading an image with Image.FromFile the picturebox control locks the file so you get an exception when you try to delete it.
After long research I found the following solution, does anybody know something more elegant?
If Not (myPic.Image Is Nothing) Then
'get rid of any former...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.