Ok, This is a hard one...For me at least.
I have a jpeg image that is being used by a picturebox in my windows form. During the duration of my program, I need to let the user replace the file that my picturebox uses an an image.
I recieve the following error:
Additional information: The process cannot access the file "C:\Documents and Settings\Ryan Barger\My Documents\Visual Studio Projects\WindowsApplication1\bin\Debug\workingDirectory\images\CRMImage[1].png" because it is being used by another process.
I have tried disposing the image prior to replacing the file.
Is there a way to close the file that was being used by the picureBox so the file can be replaced
Thanks!