Form.OnFormClosed(FormClosedEventArgs) Form.OnFormClosed(FormClosedEventArgs) Form.OnFormClosed(FormClosedEventArgs) Form.OnFormClosed(FormClosedEventArgs) Method

Definición

Genera el evento FormClosed.Raises the FormClosed event.

protected:
 virtual void OnFormClosed(System::Windows::Forms::FormClosedEventArgs ^ e);
protected virtual void OnFormClosed (System.Windows.Forms.FormClosedEventArgs e);
abstract member OnFormClosed : System.Windows.Forms.FormClosedEventArgs -> unit
override this.OnFormClosed : System.Windows.Forms.FormClosedEventArgs -> unit
Protected Overridable Sub OnFormClosed (e As FormClosedEventArgs)

Parámetros

e
FormClosedEventArgs FormClosedEventArgs FormClosedEventArgs FormClosedEventArgs

Objeto FormClosedEventArgs que contiene los datos del evento.A FormClosedEventArgs that contains the event data.

Comentarios

El OnFormClosing método quita el formulario actual desde el OpenForms colección asociado Application.The OnFormClosing method removes the current form from the OpenForms collection of the associated Application.

Cuando se genera un evento, se invoca el controlador de eventos a través de un delegado.Raising an event invokes the event handler through a delegate. Para obtener más información, consulte controlar y provocar eventos.For more information, see Handling and Raising Events.

El método OnFormClosed también permite que las clases derivadas controlen el evento sin adjuntar ningún delegado.The OnFormClosed method also allows derived classes to handle the event without attaching a delegate. Invalidación de este método es la técnica preferida para controlar el evento en una clase derivada.Overriding this method is the preferred technique for handling the event in a derived class.

Notas a los desarrolladores de herederos

Al reemplazar OnFormClosed(FormClosedEventArgs) en una clase derivada, asegúrese de llamar al método OnFormClosed(FormClosedEventArgs) de la clase base para que los delegados registrados reciban el evento.When overriding OnFormClosed(FormClosedEventArgs) in a derived class, be sure to call the base class's OnFormClosed(FormClosedEventArgs) method so that registered delegates receive the event.

Se aplica a

Consulte también: