?
Solved

How to custom colorize calendar days in the DateTimePicker control

Posted on 2012-09-04
4
Medium Priority
?
527 Views
Last Modified: 2012-10-02
I know that cracking open the DateTimePicker control and customizing it isn't possible.  I was,  however, wondering if I could wrap it or inherit from it in a way that allowed me to customize my own "colorDay" feature in calendar-mode.   I have no problem inheriting from the DateTimePicker control (if that is the best solution); the tricky part for me is actually color-coding the days programmatically.   Also this is an existing program that is in production, so I'd rather not swap it out for a totally unrelated control (even if that control behaved as described above).

Thanks.
0
Comment
Question by:David L. Hansen
  • 2
  • 2
4 Comments
 
LVL 25

Expert Comment

by:SStory
ID: 38450985
0
 
LVL 15

Author Comment

by:David L. Hansen
ID: 38451569
That looks like a great control, however, it didn't seem to have any features that I've described.
0
 
LVL 25

Accepted Solution

by:
SStory earned 2000 total points
ID: 38454865
I think I'd about prefer to write my on calendar than try to do it.  All controls are painted and I'm sure you can violate it by subclassing it and capturing messages, etc. but that would not be pretty and would require you drawing the days too I think.

Here's the kind of stuff you'll be looking at if you subclass it:
http://www.codeproject.com/Articles/6664/DateTimePicker-appears-flat

This looks awesome however, and may do what you need:
http://www.codeproject.com/Articles/10840/Another-Month-Calendar

Good luck!
0
 
LVL 15

Author Comment

by:David L. Hansen
ID: 38455030
That last link is perfect...Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question