shankar_it
Freshman
- Joined
- Jul 6, 2005
- Messages
- 46
Do any one know a command to completly stop the program running .
I have a for loop which has a try and catch function
For Each MyFile In FilesArray
Try
MyFile.Delete()
Catch ex As Exception
MessageBox.Show("close all other wondows a run the program again", "DocumentManager Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
Application.Exit()
End Try
Next MyFile
i use application.exit() to end the program ,but the program runs till "for loop" ends.
ie if the looop goes into catch 2 times then it displays the message box twice.
Is there any other command to stop the program from completly running the first time enters the catch.I use vb.net for programming.
I have a for loop which has a try and catch function
For Each MyFile In FilesArray
Try
MyFile.Delete()
Catch ex As Exception
MessageBox.Show("close all other wondows a run the program again", "DocumentManager Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
Application.Exit()
End Try
Next MyFile
i use application.exit() to end the program ,but the program runs till "for loop" ends.
ie if the looop goes into catch 2 times then it displays the message box twice.
Is there any other command to stop the program from completly running the first time enters the catch.I use vb.net for programming.