This documentation is archived and is not being maintained.

MonthCalendar.GetDisplayRange Method

Retrieves date information that represents the low and high limits of the displayed dates of the control.

[Visual Basic]
Public Function GetDisplayRange( _
   ByVal visible As Boolean _
) As SelectionRange
[C#]
public SelectionRange GetDisplayRange(
 bool visible
);
[C++]
public: SelectionRange* GetDisplayRange(
 bool visible
);
[JScript]
public function GetDisplayRange(
   visible : Boolean
) : SelectionRange;

Parameters

visible
true to retrieve only the dates that are fully contained in displayed months; otherwise, false.

Return Value

The begin and end dates of the displayed calendar.

Remarks

The GetDisplayRange method returns a SelectionRange that contains the begin and end dates displayed in the current view of the control. You can modify the returned range based on the value you specify for the visible parameter. By specifying false, you can retrieve all dates displayed on the control; specifying true retrieves only those dates that are part of fully displayed months.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

MonthCalendar Class | MonthCalendar Members | System.Windows.Forms Namespace | DateTime | SelectionRange

Show: