Hey, I've been working on a program that will be used to categorize image files. However, whenever the program actually gets to the point where it will move the image, it freezes and says it cannot run the process because the file is already in use by another process. The following is the code I used to set the image to be organized in a picture box, and then to clear the image, and then to move it, respectively.
pctbxFileViewer.Image = Image.FromFile(txtSource.text)
pctbxFileView.Image = Nothing
System.IO.File.Move(txtLocation.Text, txtDirectory.Text & folderName & newName & ".jpg")
I was wondering if anyone could tell me why this is. Thanks in advance.
pctbxFileViewer.Image = Image.FromFile(txtSource.text)
pctbxFileView.Image = Nothing
System.IO.File.Move(txtLocation.Text, txtDirectory.Text & folderName & newName & ".jpg")
I was wondering if anyone could tell me why this is. Thanks in advance.