MonthCalendar.DateSelected Event

 

Occurs when the user makes an explicit date selection using the mouse.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member DateSelected : IEvent<DateRangeEventHandler,
    DateRangeEventArgs>

This event is similar to the DateChanged event, but it occurs at the end of a date selection made using the mouse. The DateChanged event occurs during any date selection, whether by mouse, keyboard, or code.

For more information about handling events, see Handling and Raising Events.

The following code example displays a form containing a MonthCalendar control that displays one calendar year. The example demonstrates setting the BackColor, ForeColor, TitleBackColor, TitleForeColor, CalendarDimensions, and TrailingForeColor properties to customize the look of the calendar control. Other properties such as AnnuallyBoldedDates, BoldedDates, and MonthlyBoldedDates are set to customize which dates are bold. The example also sets the FirstDayOfWeek, MaxDate, MinDate, and MaxSelectionCount properties to change the calendar format. The DateSelected and DateChanged events are also handled and their status is displayed on the form.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: