Raises the Form.Closed event.
- e
- The EventArgs that contains the event data.
The Form.OnClosed(EventArgs) method is obsolete in the .NET Framework version 2.0; use the Form.OnFormClosed(FormClosedEventArgs) method instead.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The Form.OnFormClosed(FormClosedEventArgs) method also allows derived classes to handle the event without attaching a delegate. Overriding this method is the preferred technique for handling the event in a derived class.
The Form.OnClosed(EventArgs) and Form.OnClosing(System.ComponentModel.CancelEventArgs) methods are not called when the Application.Exit method is called to exit your application. If you have validation code in either of these methods that must be executed, you should call the Form.Close method for each open form individually before calling the Application.Exit method.