This documentation is archived and is not being maintained.

MonthCalendar.SetCalendarDimensions Method

Sets the number of columns and rows of months to display.

[Visual Basic]
Public Sub SetCalendarDimensions( _
   ByVal x As Integer, _
   ByVal y As Integer _
)
[C#]
public void SetCalendarDimensions(
 int x,
 int y
);
[C++]
public: void SetCalendarDimensions(
 int x,
 int y
);
[JScript]
public function SetCalendarDimensions(
   x : int,
 y : int
);

Parameters

x
The number of columns.
y
The number of rows.

Exceptions

Exception Type Condition
ArgumentException The x parameter or the y parameter is less than zero.

Remarks

The maximum number of months that you can display is 12, restricted to one calendar year. The product of the x and y parameters should be 12 or less. For values of x and y that have a product of more than 12, the greater of the x and y values will be iteratively reduced until the product is 12 or less.

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 | CalendarDimensions

Show: