I have used the code I found on your site by Herr Wagner. It works perfectly except for one minor problem. The color does not change in design mode, only run mode.
The color does not change in design mode, only run mode.
Which version of vb do you use?....
im not sure about vb6 but in later editions .....you can view the designcode..... .(This is the code the program uses to display and design your form.)
(not event code)..
I believe the code you placed was in the event area
.Net allows you to inherit from the Microsoft supplied controls. You can then add properties and methods to enhance the control. Unfortunately, in their infiinte wisdom, Microsoft decided to make the BackColor and ForeColor properties of the DateTimePicker control visible, but did not implement the properties. They also did not provided a user accessible Pain event. Setting the BackColor and ForeColor properties has no effect. If you want to change the BackColor of the DateTimePicker you need to implement your own BackColor property and and override the WndProc subroutine to have the property take effect (see http://dotnet.mvps.org/dotnet/faqs/?...color&lang=en). The code provided at the previously mentioned web site works fine and changes the color run mode but does not change the color in design mode, hence my original question.
Last edited by Killer42; Jan 8 '08, 01:56 AM.
Reason: Activate link
Comment