Permalink
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (41 sloc) 2.04 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
How to: Display More than One Month in the Windows Forms MonthCalendar Control
03/30/2017
.net-framework
dotnet-winforms
article
jsharp
calendars, formatting display
examples [Windows Forms], calendar controls
calendars, multiple months
MonthCalendar control [Windows Forms], formatting display
d197caa2-38a5-4cb4-acc3-562130c2ace3
12
dotnet-bot
dotnetcontent
wpickett

How to: Display More than One Month in the Windows Forms MonthCalendar Control

The Windows Forms xref:System.Windows.Forms.MonthCalendar control can display up to 12 months at a time. By default, the control displays only one month, but you can specify how many months are displayed and how they are arranged within the control. When you change the calendar dimensions, the control is resized, so be sure there is enough room on the form for the new dimensions.

To display multiple months

  • Set the xref:System.Windows.Forms.MonthCalendar.CalendarDimensions%2A property to the number of months to display horizontally and vertically.

    MonthCalendar1.CalendarDimensions = New System.Drawing.Size (3,2)  
    monthCalendar1.CalendarDimensions = new System.Drawing.Size (3,2);  
    monthCalendar1->CalendarDimensions = System::Drawing::Size (3,2);  

See Also

MonthCalendar Control
How to: Select a Range of Dates in the Windows Forms MonthCalendar Control
How to: Change the Windows Forms MonthCalendar Control's Appearance