When the MonthCalendar
control is rendered using visual styles, its size just follows system settings and you cannot change its size. However, as an option you can disable visual styles for this control and set a larger font for the control to change its size using SetWindowTheme
:
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public class MyMonthCalendar : MonthCalendar
{
[DllImport("uxtheme.dll", ExactSpelling = true, CharSet = CharSet.Unicode)]
static extern int SetWindowTheme(IntPtr hwnd, string pszSubAppName, string pszSubIdList);
protected override void OnHandleCreated(EventArgs e)
{
SetWindowTheme(Handle, string.Empty, string.Empty);
base.OnHandleCreated(e);
}
}
Then it will appear like this (Font-size: 16):
Comparing to the default appearance:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…