I have this problem when I'm trying to delete a temporal file I made, the
problem is I create this file from a Twain source and then make a temp file
to do some editing to it, I assing the mantioned file to a picturebox and
work from there, when the form closes I try to delete the file and I keep on
getting that the file is used by another process and that it can't be
accessed. I tried disposing and setting to nothing the picturebox but it
still wont let me erase the file. Any ideas?
Basically I'm doing this:
picturebox01.Image = Bitmap.FromFile("tmp.jpg") 'In the load event of the
form
and
File.Delete(Application.StartupPath.ToString & "\tmp.jpg") 'in the onclosing
sub
Help will be really apretiated.
Thanks in advanced. BTW all this is in a form thats a child MDI if this
helps at all.
Alvaro