How to delete a file which is in use/open by some process in runtime. I am using vb.net for my project and a image is shown in picturebox, and that should be deleted, without cl
You can close the proccess down, then delete it, or delete on reboot. Use the above suggestions for information on using MoveFileEx() with Windows.
To close down a process you can do the following:
For Each proc As Process In System.Diagnostics.Process.GetProcessesByName("process name here")
proc.Kill()
Next