Problems with Directory.Move

The goal of this software is to allow image captures to be stored in a temporary directory, viewed in the image viewer, and then have the user able to choose to delete or save the contents of the temporary directory.

Deleting is easy.

But whenever I try to save the information (by moving the temporary directory to the user-defined saved directory), I get the System.IOException error that the operation can't be done because the temporary folder is still in use.

This is driving me nuts.

I have a picture box (pbCaptureImage) with an image.Fromfile (the image I wish to show), a label (lPlaybackName) with the file name (not the entire path) of the image, a text box (lblPBFrame) that has the current image + (As in, "2 of 40"), and a track bar (tbplayback) that has a tick for every image in the directory.

After a capture session, the application saves all the pictures taken to the harddrive in a folder called "uBtemp", and allows the user to look through the images. This is performed in a function called "WriteTemp().

However, if I try to save the data by using the 'save' button to try renaming the existing directory (by using Directory.Move), the program tells me it cannot access the temporary directory.

If I edit out the setup for the trackbar and image capture, there is no problem, but I dont' get the intended functionality of allowing the user to look at the images beforehand.

Oh, and PastNames is an arraylist of the file paths without the extensions.

After further research, it appears that the problem is likely due to file share settings. That is to say, it is currently only allowing one process to access the file.

This gives me a few options on what to explore as solutions.
1. Find out how to release access (Preferred)
2. Open up the ability to share the active file, change the image being used to a splash screen, and then move the file... Probably not a great idea.
3. As 2, only with copying everything to a new directory, rather than renaming... (Last resort)

To follow up on 1, anyone know if/how you can use a FileInfo reference to load an image into a picturebox control, in a way that allows the fileshare permissions to be changed?