1
Answer

How to free an image shown in Picture Box in VB.net

sheetu sachdeva

sheetu sachdeva

17y
2.2k
1
We are using VB.net 2003. Suppose we show an image(picked from hard disk) in a picturebox .
Now I want to remove this image from picturebox and Overwrite/ Delete the image i loaded earlier in picturebox. How can we do that ?
I have used the command :
picturebox.image=nothing
This makes the picturebox empty. But when try to delete/overwrite the image shown in picturebox earlier,  using file.delete then it gives the message "Can't delete , File is being used by the process" . Can anybody give me some solution ?

Answers (1)