469,602 Members | 1,751 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Unloading a picture from a picturebox in VB.net

I have done some code to load a picture in an array of bytes. The data
is saved in a file in the Hard drive. There is also another piece of
code to display the image. My issue is that I need to unload the
picture before the user press the button to refresh and therefore
reload the image. Generally I would have an error when I try to
download the file and save it. I will have an error that the file is
being used by another process. Noticed that picturebox1.load = nothing
will unload the picture from the picturebox but it will not close the
file completely before going the next instructions. Checking "If
picturebox1.load is nothing = true will be true and therefore there
will no way to identify if the file has been closed or not. I don't
want to use the destroy method since this will remove the picturebox
completely, but if there is no solution to this, I have to destroy it
and recreating it at runtime.

Any suggestions pls?

Dec 2 '06 #1
0 1067

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Chris Coho, Jr. | last post: by
1 post views Thread by Dennis | last post: by
1 post views Thread by Jeff Williams | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.