Bewerken

Delen via


MonthCalendar.OnDateSelected(DateRangeEventArgs) Method

Definition

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)

Parameters

drevent
DateRangeEventArgs

A DateRangeEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnDateSelected method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

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.

Applies to

See also