How can I change the color of certain dates in the MonthCalendar control?
This is not possible. There is no built-in way of customizing the way that individual days or dates are displayed on the MonthCalendar
control.
You could owner-draw the control, but that's way too much work to justify. This will make you responsible for drawing the entire control yourself. Note that if you choose to go this route, the MonthCalendar
control does not raise the Paint
event because the base control sets the UserPaint
bit to "False". You will have to subclass the control and override its OnPrint
method instead.
I can't personally recommend any third-party controls that provide this level of customization, but a quick Google search does appear to turn up a few options:
- Another Month Calendar
- Customizable MonthCalendar Type Control
- MonthCalendar Calendar - Control