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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.