Exit

The Exit() method forcibly ends the application. The method informs your application's message queue that it should terminate, and your forms are closed after the last Windows messages in the queue are processed. It does not take any arguments and does not return a value.

In simple cases, your code does not need to call the Exit() method. The default Windows form includes a Close box in the upper-right corner of the form, and clicking that box sends a quit message to your Windows message queue. You may want to call Exit(), however, if your form includes a control, such as a button or a menu item, that should exit the application when it is selected.

0 0

Post a comment