所以这是我在模块函数中的代码。我想关闭我调用的程序Application.Exit
,但它一直在运行。有充分的理由吗?
Dim OpenFileDialog1 As New FolderBrowserDialog
If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
pictureFolder = OpenFileDialog1.SelectedPath
movingPictures(pictureFolder)
'GetImagePath()
Else
Dim answer As DialogResult
answer = MessageBox.Show("The Program needs this folder to continue, " & vbCrLf & _
"Choose Retry to try again, or Cancel to close.", "Retry or Close?", MessageBoxButtons.RetryCancel, MessageBoxIcon.Information)
If answer = vbRetry Then
GoTo RepickOpenfileDialog
Else
' essentially ... here is where I'd like to close the program ...
' but it simply won't... it keeps running though the code...
' there a good reason for that ?
Application.Exit()
Form1.Close()
End If
End If
processLock = 0