Just start a new Windows Forms Application and change the Form1 constructor to this code(which was copied from MSDN)

public Form1()
        {
            InitializeComponent();
            // Create the calendar.
            MonthCalendar monthCalendar2 = new System.Windows.Forms.MonthCalendar();

            // Set the calendar location.
            monthCalendar2.Location = new System.Drawing.Point(50, 50);

            // Change the color.
            monthCalendar2.BackColor = System.Drawing.SystemColors.Info;
            monthCalendar2.ForeColor = System.Drawing.Color.FromArgb(
                                     ((System.Byte)(192)), ((System.Byte)(0)), ((System.Byte)(192)));
            monthCalendar2.TitleBackColor = System.Drawing.Color.Purple;
            monthCalendar2.TitleForeColor = System.Drawing.Color.Yellow;
            monthCalendar2.TrailingForeColor = System.Drawing.Color.FromArgb(
                                     ((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(0)));

            // Do not show the "Today" banner.
            monthCalendar2.ShowToday = false;

            // Do not circle today's date.
            monthCalendar2.ShowTodayCircle = false;

            this.Controls.Add(monthCalendar2);
        }

My problem is that the color changes don't show and I wonder why.
I feel like I'm omitting something, but having searched here, there and everywhere I am stuck. Is it my OS?(Vista)
Thanks in advance for any enlightment on this.:S

Recommended Answers

All 4 Replies

Yes, Danny, it's Vista problem (Aero, and Vista basic) color scheme, if you turn it into Windows Classic it'd work.

Or, remove Vista style

[STAThread]
        static void Main()
        {
            //Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
commented: Offered a plethora of solutions to the problem! +4

Thanks Ramy!
I indeed have Vista Basic.
Your suggestions all work, so I consider this as solved.
Thanks again!

For this problem you can disable visual styles for your application through properties of your application.

read this article about how to change appearance of month calendar and how to disable Visual style of application:

How to disable Visual Style of application

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.