MonthCalendar is one of the most important calendar control.
This control is used for selecting the date and range of the date.
In my previous article I have shown you How
to get the selected date of a MonthCalendar control in C#. Some of my previous articles are as follows Create
MDI Form in C# | C# MDI Form . For opening the MDI form in windows application
refer the article Open
For MDI Parent Using C#.Net and VB.Net. For opening a command prompt on
button click of the application is as follows How
to Open Command Prompt Using C#.net.
So in this article I will show you Displaying More than One
Month in the Windows Forms MonthCalendar Control Using C#. This article I will show you in two parts. In
first part I will show you how you can
display more than one month in windows
application MonthCalendar. In part I will perform operation just by setting property
and in second part I will show you how you can perform the same operation bys
using c# or vb.Net.
For this we will just use CalendarDimensions property.
Part 1: In part 1
I will show you how you can display more than one calendar horizontally and
vertically.
Horizontal:
For this we will set the CalendarDimensions property as shown below.
After this you will get output as shown below:
Vertical:
For this we will set the CalendarDimensions property as shown below.
After this you will get output as shown below:
Part 2: In part
two will see how to do the above operation by using c# and Vb.net.
Horizontal:
{
monthCalendar1.CalendarDimensions =
new System.Drawing.Size(2,
1);
|
After execution you will get output as shown below:
Vertical:
{
monthCalendar1.CalendarDimensions =
new System.Drawing.Size(1,
2);
|
After execution you will get output as shown below:
0 comments:
Please let me know your view