sheetu sachdeva

sheetu sachdeva

  • NA
  • 33
  • 14.1k

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

May 16 2007 4:59 AM
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)