the_lotus
the_lotus

Reputation: 12748

MonthCalendar different in Windows 7

We are making sure our applications works in Windows 7 from Windows XP. One of them uses a System.Windows.Forms.MonthCalendar. The display is completely different.

The calendar has a MaxDate, in the XP version we could see all the dates but not select them. In Win 7 the dates that can't be selected are not visible.

Is it possible to show all the dates?
I can't find an official microsoft statement about this change.

XP vs Win7

enter image description here enter image description here

Upvotes: 0

Views: 919

Answers (1)

Hans Passant
Hans Passant

Reputation: 941267

Yes, MonthCalendar is one of the Common Controls in Windows. It is in the same group as TreeView and ListView, surely you noticed that they look different as well. And a cousin of the Common Dialogs, behold OpenFileDialog. You skipped Vista, that's when MonthCalendar got the new look-and-feel.

This is the way that Microsoft gives versions of a Windows a different look and innovates on usability of standard Windows UI elements. Heavily weighed and pained over and user tested. You'll automatically get that same look as well, there's nothing you have to do in your code. Which is a Very Nice Feature, your user will instantly now how to use your program because it looks and works like any other program she uses.

Trying to rewind the clock is, well, a bad idea. Your app will look like it was forgotten about back in the previous century, never the kind of impression you want to leave with a paying customer. And will be starkly different from any other app that uses the calendar. You can monkey with SetWindowsTheme() to override the visual style but that puts the clock back to 1999. Don't do it.

Upvotes: 2

Related Questions