Link to home
Start Free TrialLog in
Avatar of bdzot
bdzot

asked on

file in use by another process

Up front, fairly new at vb.net.

I'm writing an application that views images in a picturebox, allows a keyer to enter data from the image, saves the data to an excel spreadsheet.

The problem I'm having is that when I try to move the images from the unread directory to the read directory, the program gives me the error "File in use by another process" (and, since it's the only process running, I'm assuming it's the program itself that has it).

The move syntax is fairly straightfoward ("file.move(unreadDirectory & imgpic, readDirectory & imgpic)".

How do I get the program to let go of the image file to move it?  I've tried both giving the picturebox the next image before moving it, and tried "picturebox1.picture = Nothing", but neither work.

Help?
ASKER CERTIFIED SOLUTION
Avatar of SSSoftware
SSSoftware

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bdzot
bdzot

ASKER

Outstanding.  Worked great!

Thanks, Ed