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 ?
Loading
Scott LyslePosted May 17, 2007, 7:04 PM
C#:
pbx.Image = null;
pbx = new PictureBox();
VB.NET:
pbx.Image = nothing
pbx = New PictureBox()