DateTimePicker colors


Can anyone tell me why CalendarMonthBackground, CalendarForeColor and other color related properties of DateTimePicker control don`t work in .NET.  I tried them in VB6 and .NET.  They work in VB6.

Example:   dateTimePicker.CalendarMonthBackground = Color.Green;

Thanks for your reply
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
DateTimePicker.CalendarMonthBackground Property

"Starting with Windows Vista and depending on the theme, setting this property might not change the appearance of the calendar. For example, if Windows is set to use the Aero theme, setting this property has no effect. This is because an updated version of the calendar is rendered with an appearance that is derived at run time from the current operating system theme. If you want to use this property and enable the earlier version of the calendar, you can disable visual styles for your application. Disabling visual styles might affect the appearance and behavior of other controls in your application. To disable visual styles in Visual Basic, open the Project Designer and uncheck the Enable XP visual styles check box. To disable visual styles in C#, open Program.cs and comment out Application.EnableVisualStyles()"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
webskiAuthor Commented:
Thanks TheLearnedOne. It is what i needed. I guess it`s a not a good idea to disable Visual Styles but that solves the problem.
Actually I don't have much experience in the DateTimePicker control. I'd worked with a C# DateTimePicker UI control before, maybe the color problems can be easily tackled with those kind of UI controls. Anyway, you may read the DateTimePicker Tutorial to see if there is any contents that be helpful to your situation.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.