Link to home
Start Free TrialLog in
Avatar of stanuf
stanuf

asked on

Selected field color

Hi I have a c#.net project and I am wondering how to change the selected color of a field.  For example I have a form that has two drop down list.  The font color is black.  When I install this on my client's machine they have different color settings and when they go in the drop down list the color that selects the item in the list is a dark blue.  Is there a way to specify this so that it doesn't use the users computer setting but always uses the color I want.  Seems to be is would be a simple thing to change, but I just can't figure out where it is.

Thanks,
Stacy
ASKER CERTIFIED SOLUTION
Avatar of msdixon
msdixon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stanuf
stanuf

ASKER

It's not the forcolor that I want to change -- that stays black.  What I want to change is when you enter the field it highlights it and the highlight color is the one I want to change.
The default WinForms combobox does not allow for customizing that color, unfortunately. You could derive your own subclass and paint the combo yourself, but it's rather cumbersome.
Avatar of stanuf

ASKER

Bummer -- Do you know what windows display setting it uses?  I guess I could just change that when I do the install.....
Control panel / Display / Appearance / Advanced / Item: Selected items - but I'm not sure it's a good idea to make that change upon installation. You're likely to cause quite a shock for the user!
Avatar of stanuf

ASKER

Thanks for the info!