I need to change the grey background to white.
For Textbox, I can set enable= false and change the backcolor=window.
For NumericUpDown, I can also disable and change backcolor.
But for ComboBox and DatetimePicker, after I set enable=false, I cannot find the place to set the backcolor. So during runtime, the ComboBox and DatetimePicker backcolor will be grey out and hard to read.
Vincent

How to change disabled combo and datepicker background?
SuperPoney
The thing is, the back color changes to show your users that the control is disabled. If you don't want to ever enable the control, consider using a label instead to display your data. A combobox is a listbox and an edit control. I'm not sure if the underlying controls are exposed in c#, I believe they were in c++. They don't appear to be, nor are they in the Controls collection, that I can see.
The other option is to owner draw. Owner drawing a text box is notoriously hard, but only because of drawing that happens while editing. If your control will be disabled, that should not be a problem.
jamz
I also have the same problem. Have use some time on this problem without finding a answar. If someone has the answare, please let us know.
GerEielts
Hello Vinc:
I had the same problem and until today I wasn't been able to resolve it.
The method I use is:
In the public Class:
Private lFieldsActive As Boolean = False
For each of the controls I declare the function:
Private
Sub Control_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Control.GotFocus If Not lFieldsActive Then SendKeys.Send("{TAB}") End SubWhen I need to enable the control to enter data first set lFieldsActive to true.
When the changes are made I set lFieldsActive to false.
With this method the background color isn't changed.
Hope this would help you.
Rafael Altungy
SPAIN