N
NickP
Hi there,
This is really crazy!
1. Make a folder
2. Put a text file in the folder
3. Run the following code...
Dim pop As New OpenFileDialog
Using pop
Call pop.ShowDialog()
End Using
4. Browse for the newly created text file
5. Press OK on the OpenFileDialog
6. Now try to delete the folder you created in step 1.
On my system I am being informed that a process is using the folder,
which it is, but why? The OpenFileDialog and SaveFileDialog automatically
instantiate a file handle to the folder when pressing OK? They dont make a
handle to the text file, only the folder...
Any ideas on how I can destroy this handle, I presumed disposing the
OpenFileDialog object would be adequate but obviously not as it should be
disposed by the 4th line.
Nick.
This is really crazy!
1. Make a folder
2. Put a text file in the folder
3. Run the following code...
Dim pop As New OpenFileDialog
Using pop
Call pop.ShowDialog()
End Using
4. Browse for the newly created text file
5. Press OK on the OpenFileDialog
6. Now try to delete the folder you created in step 1.
On my system I am being informed that a process is using the folder,
which it is, but why? The OpenFileDialog and SaveFileDialog automatically
instantiate a file handle to the folder when pressing OK? They dont make a
handle to the text file, only the folder...
Any ideas on how I can destroy this handle, I presumed disposing the
OpenFileDialog object would be adequate but obviously not as it should be
disposed by the 4th line.
Nick.