Advertisement

05.15.2008 at 07:59AM PDT, ID: 23405401
[x]
Attachment Details

Windows Classic Style vs Windows XP style

Asked by weimha in Microsoft Visual C#.Net, Windows Forms for .Net

Tags: C# Windows Forms

I had been try for along time to change the color of my column headers in a datagridview.   I was using the following code and it never worked.  

 DataGridViewCellStyle style =
                      dataGridView1.ColumnHeadersDefaultCellStyle;
style.BackColor = Color.Red;
style.ForeColor = Color.White;          
dataGridView1.ColumnHeadersDefaultCellStyle = style;

I finally gave up on it but left the code in there.  Then I installed my program on someone elses computer and magically the column headers were a different color.  I finally figured out that the difference was that I had my display settings set for Windows XP style, while the other person had Windows Classic Style.

Is there a way to 1) change the column headers in XP Style, or 2) force Windows XP Style to be applied requardless of the user's display settings?


Start Free Trial
[+][-]05.15.2008 at 04:28PM PDT, ID: 21578770

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 04:32PM PDT, ID: 21578794

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 06:02PM PDT, ID: 21579101

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, Windows Forms for .Net
Tags: C# Windows Forms
Sign Up Now!
Solution Provided By: theplonk
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628