A
Anil Gupte
Private Sub mnu2Exit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnu2Exit.Click
Dim fDir As String = Path.GetDirectoryName(L3Global.VideoFileName)
File.Delete(L3Global.VideoFileName)
' The following is not working - reports directory not empty exception
' Directory.Delete(fDir)
Application.Exit()
End Sub
There is only one file in there. Once the app exits, I see that the
directory is empty. Perhaps the file takes a while to delete or the
application is still using it until it exits. How can I make sure the
directory is also delete.
Thoughts?
System.EventArgs) Handles mnu2Exit.Click
Dim fDir As String = Path.GetDirectoryName(L3Global.VideoFileName)
File.Delete(L3Global.VideoFileName)
' The following is not working - reports directory not empty exception
' Directory.Delete(fDir)
Application.Exit()
End Sub
There is only one file in there. Once the app exits, I see that the
directory is empty. Perhaps the file takes a while to delete or the
application is still using it until it exits. How can I make sure the
directory is also delete.
Thoughts?