MonthCalendar.OnDateSelected(DateRangeEventArgs) MonthCalendar.OnDateSelected(DateRangeEventArgs) MonthCalendar.OnDateSelected(DateRangeEventArgs) MonthCalendar.OnDateSelected(DateRangeEventArgs) Method

Definición

Genera el evento DateSelected.Raises the DateSelected event.

protected:
 virtual void OnDateSelected(System::Windows::Forms::DateRangeEventArgs ^ drevent);
protected virtual void OnDateSelected (System.Windows.Forms.DateRangeEventArgs drevent);
abstract member OnDateSelected : System.Windows.Forms.DateRangeEventArgs -> unit
override this.OnDateSelected : System.Windows.Forms.DateRangeEventArgs -> unit
Protected Overridable Sub OnDateSelected (drevent As DateRangeEventArgs)

Parámetros

drevent
DateRangeEventArgs DateRangeEventArgs DateRangeEventArgs DateRangeEventArgs

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

Comentarios

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 OnDateSelected también permite que las clases derivadas controlen el evento sin adjuntar ningún delegado.The OnDateSelected method also allows derived classes to handle the event without attaching a delegate. Ésta es la técnica preferida para controlar el evento en una clase derivada.This is the preferred technique for handling the event in a derived class.

Notas a los desarrolladores de herederos

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

Se aplica a

Consulte también: