Solved

Selected field color

Posted on 2004-10-18
6
196 Views
Last Modified: 2010-04-15
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
0
Comment
Question by:stanuf
  • 3
  • 2
6 Comments
 
LVL 9

Accepted Solution

by:
msdixon earned 250 total points
ID: 12338451
use the system colors. for instance you can select SystemColors.ControlText for the fore color.
0
 

Author Comment

by:stanuf
ID: 12339825
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.
0
 
LVL 6

Expert Comment

by:der_jth
ID: 12339939
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.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:stanuf
ID: 12339957
Bummer -- Do you know what windows display setting it uses?  I guess I could just change that when I do the install.....
0
 
LVL 6

Expert Comment

by:der_jth
ID: 12340429
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!
0
 

Author Comment

by:stanuf
ID: 12340699
Thanks for the info!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now