Jeff,
You don't need to do all that. How are you loading the image? If
anything, create the FileStream yourself to load into the Bitmap object,
load the file, and then associate it with the picture box. If I recall
correctly, the from file methods (or whatever they are called) open the file
for exclusive access and don't let it go until the picturebox is disposed of
(or rather the Bitmap instance the picturebox conjures up to show the
picture).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Jeff Williams" <je***********@hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
>I have a picture (jpg) displaying in a picture box but I find that the file
handle is still open to the image on disk.
I think I need the following to happen
1. Load image from file on disk
2. Copy the loaded image to another object.
3. Close the file on disk
4. Display the image in the picture box as a thumbnail.
5. Allow user to rotate image if necessary by reloading the file
6. Save image back to disk as the same file name
Am I on the right track and if so how do I achieve option 2.
Regards
Jeff