Hi, I want to change the backcolor of the Datetimepicker's textbox Datetimepicker.MontheBackgroundCOlor Not works for changing color of the textbox of datetimeker control.
Apparently you cant. From the documentation of the DateTimePicker.BackColor property:
Setting the BackColor has no effect on the appearance of the DateTimePicker. To set the background color for the drop-down calendar of the DateTimePicker, see the CalendarMonthBackground property.
I have no idea why this is the case, but it is.
CommonGenius.com Saturday, February 18, 2006 4:51 AM
new SolidBrush(this.BackColor), this.ClientRectangle);
g.Dispose();
return;
}
base.WndProc(ref m);
}
Ruslan Inozemtsev Wednesday, August 01, 2007 3:17 PM
This doesn't really work at all as the non-transparent calendar control is drawn over top straight away. Is there a way to have an overriden OnPaintBackground called without an overriden OnPaint being called? Overriding OnPaint seems over the top for this, it would be easier to make a new control based on MaskedTextBox and DateTimePicker.