Occurs when the date selected in the MonthCalendar changes.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The following code example creates a SelectionRange, sets its Start and End properties, and assigns the SelectionRange to the SelectionRange property of the MonthCalendar control. When the event is raised, the Start and End property values are displayed in the text boxes. This example requires that you have a Form with two TextBox controls, a Button, and a MonthCalendar control.
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 events are also handled and their status is displayed on the form.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.