Control.OnPreviewKeyDown(PreviewKeyDownEventArgs) Control.OnPreviewKeyDown(PreviewKeyDownEventArgs) Control.OnPreviewKeyDown(PreviewKeyDownEventArgs) Control.OnPreviewKeyDown(PreviewKeyDownEventArgs) Method

Definição

Aciona o evento PreviewKeyDown.Raises the PreviewKeyDown event.

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

Parâmetros

Comentários

A geração de um evento invoca o manipulador de eventos por meio de um delegado.Raising an event invokes the event handler through a delegate. Para obter mais informações, consulte manipulando e gerando eventos.For more information, see Handling and Raising Events.

O OnPreviewKeyDown método também permite que classes derivadas manipulem o evento sem anexar um delegado.The OnPreviewKeyDown method also allows derived classes to handle the event without attaching a delegate. Essa é a técnica preferida para manipular o evento em uma classe derivada.This is the preferred technique for handling the event in a derived class.

Notas aos Herdeiros

Ao substituir OnPreviewKeyDown(PreviewKeyDownEventArgs) em uma classe derivada, certifique-se de chamar o método da OnPreviewKeyDown(PreviewKeyDownEventArgs) classe base para que os delegados registrados recebam o evento.When overriding OnPreviewKeyDown(PreviewKeyDownEventArgs) in a derived class, be sure to call the base class's OnPreviewKeyDown(PreviewKeyDownEventArgs) method so that registered delegates receive the event.

Aplica-se a