Reputation: 59
I have a datetimepicker in my Windows form. This may sound like a silly question with a rather simple answer. However, I just can't find a solution to fit my purpose.
Question > Is there a way in which I can change the back colour of the datetimepicker in the form to a different colour other than the generic white?
Thanks for your help.
Upvotes: 2
Views: 347
Reputation: 374
Change the BackColor
property
Public Class Form1
Public Sub New()
InitializeComponent()
myDateTimePicker1.BackColor = Color.Red
myDateTimePicker2.BackColor = Color.Yellow
myDateTimePicker3.BackColor = Color.Green
End Sub
End Class
or Overrides OnPaint
function
Upvotes: 1
Reputation: 190925
Set the CalendarMonthBackground
property to the color of your choice, but it depends on the theme as well.
Upvotes: 0