Greetings
I have a MDI application that when run for the first time it asks for the activation code by showing the main Windows Form (MDI parent) and another activation acquire code Windows Form showed above the main Windows Form using the ShowDialog() method. The main Windows Form including a tool strip button when I exit the activation Windows Form by clicking the X upper right corner button, that tool strip is disabled and I cannot use it to exit the application and when I click the X upper right corner button of the main Windows Form to exit the application it gives me an error Windows report message informing that "vshost-clr2.exe has stopped working" when I looked for the main Windows form FormClosed event I found that line of code
System.Environment.Exit(0)
What is the problem the causing such error "vshost-clr2.exe has stopped working" when clicking the X upper right corner of the main Windows Form (the MDI parent)