Click here to Skip to main content
15,849,615 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I only need to change back color of date fetched from database in month calendar.
It is only possible to change boldness of date in month calendar.How I can change back color of date?

What I have tried:

I have referred many site,but only result i get,it's not possible through
inbuilt calendar control in window application.

https://www.codeproject.com/Articles/10482/Customizable-MonthCalendar-Type-Control-Part

I have referred this site of code project,but it's not running.

Sir,will you please provide me any other external component of calendar control,where i can change back color of date in window application .
Please guide me.

Thanks in advance.
Posted
Updated 27-Jan-17 8:29am
v3
Comments
Pete O'Hanlon 17-Jan-17 5:50am    
The forums at the end of articles are the best place to ask questions about the contents of the article. If you post your question there, you stand more of a chance of the author giving you an answer. It's highly unlikely that they will wander by QA and recognise that the question is about their content.
Sinisa Hajnal 17-Jan-17 8:43am    
As you already noted, it is not possible in window calendar. BUT! You could try extending the control and doing your own drawing by overriding OnPaint event. Hard, but doable. Other than that, look for third party components, don't ask others to search for you.

1 solution

I have just downloaded the projects from the article you mention (Customizable MonthCalendar Type Control: Part 1[^]) and they work fine.

Note that I am using VS2013 so I had to create a new solution. First I loaded the project MPK_Calendar. Visual Studio did an automatic one-way converstion for me. I then built the project to check everything was Ok (it was).

Then I added MPK_Calendar_demo to my solution - again this was converted by VS.

I had to manually add a Solution reference to MPK_Calendar in the Reference section of that project. I was then able to successfully build the entire solution.

Making sure that I set Calendar_Test as the Startup project I was then able to run the demo. Selecting the button "Selected Day Color" changed the backcolor of whichever date I then clicked.

I suggest you attempt the same steps as me (in the same order). By all means come back if you still can't get that code to work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900