Expand Minimize

MonthCalendar.HitArea Enumeration

Defines constants that represent areas in a MonthCalendar control.

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

public enum HitArea

Member nameDescription
CalendarBackgroundThe specified point is part of the calendar's background.
DateThe specified point is on a date within the calendar. The Time property of MonthCalendar.HitTestInfo is set to the date at the specified point.
DayOfWeekThe specified point is over a day abbreviation ("Fri", for example). The Time property of MonthCalendar.HitTestInfo is set to January 1, 0001.
NextMonthButtonThe specified point is over the button at the upper-right corner of the control. If the user clicks here, the month calendar scrolls its display to the next month or set of months.
NextMonthDateThe specified point is over a date from the next month (partially displayed at the top of the currently displayed month). If the user clicks here, the month calendar scrolls its display to the next month or set of months.
NowhereThe specified point is either not on the month calendar control, or it is in an inactive portion of the control.
PrevMonthButtonThe specified point is over the button at the upper-left corner of the control. If the user clicks here, the month calendar scrolls its display to the previous month or set of months.
PrevMonthDateThe specified point is over a date from the previous month (partially displayed at the top of the currently displayed month). If the user clicks here, the month calendar scrolls its display to the previous month or set of months.
TitleBackgroundThe specified point is over the background of a month's title.
TitleMonthThe specified point is in a month's title bar, over a month name.
TitleYearThe specified point is in a month's title bar, over the year value.
TodayLinkThe specified point is on the today link at the bottom of the month calendar control.
WeekNumbersThe specified point is over a week number. This occurs only if the ShowWeekNumbers property of MonthCalendar is enabled. The Time property of MonthCalendar.HitTestInfo is set to the corresponding date in the leftmost column.

This enumeration includes specific areas of the MonthCalendar control as its enumerated values. The HitArea member of MonthCalendar.HitTestInfo is one of these enumerated values, and indicates which portion of a month calendar is under a specified point.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft