Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change the forecolor on the datetimepicker

Status
Not open for further replies.

dynodave

Programmer
Sep 23, 2002
11
GB
How do you change the forecolor of a datetimepicker. As I seem unable to change it

Thanks
 
Try to remember that your question has likely been asked and answered in the past. Do a keyword search and you'll usually come up with some goodies.

That said check it out here.
thread796-361876 That'l do donkey, that'l do
[bravo] Mark
 
You can set the text color and the background color of almost anything using the API functions SetTextColor and SetBkColor. For the control in question you will have to get the Device Context first...use GetDC to get it...I'm assuming you can get a handle to the datetimepicker to use with GetDC...I would also like to say that the datetimepicker control has some really lame limitations such as the forecolor and backcolor being so hard to change for the actual text area and the fact that it doesn't really accept null values except via that screwy checkbox feature...an as for binding to empty or null dates...forget about it...MS should have their people do a little work on that thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top