locked
Window XP to 7 Issue? RRS feed

  • Question

  • We have Visual Studio created applications running on Windows XP boxes and we're migrating to Windows 7. On the Windows 7 PC's the forms now appear without the text being displayed (the label is black), It displays fine on Windows XP boxes.  I looked at the projects and the backColor property is set to ActiveCaptionText. Am I missing something??? I can fix it manually but dread going though every form and every application one by one.

    Wednesday, February 1, 2012 7:41 PM

Answers

  • The (default) ActiveCaptionText in XP looks to be white. On Windows 7 it looks to be black. So, your application is exhibiting designed behavior. Basically, yes, you need to correct the problem that someone has introduced.

    However, you may be able to write a program to go through the designer files, iterating through each line and replacing ActiveCaptionText with Control (which is the default), or removing the BackColor entry in the file, if it is a label.


    Stephen J Whiteley
    • Edited by SJWhiteley Wednesday, February 1, 2012 8:04 PM
    • Proposed as answer by Mark Liu-lxf Friday, February 3, 2012 2:56 AM
    • Marked as answer by Mark Liu-lxf Tuesday, February 14, 2012 6:58 AM
    Wednesday, February 1, 2012 8:03 PM
  • The Active Caption color is defined in the SystemColors Class.  These are set in the OS.

    http://msdn.microsoft.com/en-us/library/system.drawing.systemcolors.aspx

    Active caption is the color of the background of the active window's title bar.  

    In XP these can be set in the "Display->Appearance->Advanced" panel under the control panel.

    In Vista, these are under the control panel, Window Color and Appearance->Advanced.

    I don't have access to Win 7 at this time, but I would assume that its similar to Vista.

    So as a stop-gap measure, you could change specified the system color on the affected systems.
    • Proposed as answer by Mark Liu-lxf Friday, February 3, 2012 2:56 AM
    • Marked as answer by Mark Liu-lxf Tuesday, February 14, 2012 6:58 AM
    Thursday, February 2, 2012 12:28 AM

All replies

  • The (default) ActiveCaptionText in XP looks to be white. On Windows 7 it looks to be black. So, your application is exhibiting designed behavior. Basically, yes, you need to correct the problem that someone has introduced.

    However, you may be able to write a program to go through the designer files, iterating through each line and replacing ActiveCaptionText with Control (which is the default), or removing the BackColor entry in the file, if it is a label.


    Stephen J Whiteley
    • Edited by SJWhiteley Wednesday, February 1, 2012 8:04 PM
    • Proposed as answer by Mark Liu-lxf Friday, February 3, 2012 2:56 AM
    • Marked as answer by Mark Liu-lxf Tuesday, February 14, 2012 6:58 AM
    Wednesday, February 1, 2012 8:03 PM
  • The Active Caption color is defined in the SystemColors Class.  These are set in the OS.

    http://msdn.microsoft.com/en-us/library/system.drawing.systemcolors.aspx

    Active caption is the color of the background of the active window's title bar.  

    In XP these can be set in the "Display->Appearance->Advanced" panel under the control panel.

    In Vista, these are under the control panel, Window Color and Appearance->Advanced.

    I don't have access to Win 7 at this time, but I would assume that its similar to Vista.

    So as a stop-gap measure, you could change specified the system color on the affected systems.
    • Proposed as answer by Mark Liu-lxf Friday, February 3, 2012 2:56 AM
    • Marked as answer by Mark Liu-lxf Tuesday, February 14, 2012 6:58 AM
    Thursday, February 2, 2012 12:28 AM
  • Stephen - Thanks for the reply and the suggestion. I wrote the initial applications quite a few years ago and never would have guessed that MS would change a default color.  Right now I'm seeing it on Labels and PictureBoxes.
    Thursday, February 2, 2012 10:48 AM
  •  I wrote the initial applications quite a few years ago and never would have guessed that MS would change a default color.

    Things change, especially eye-candy settings.  You could have the same problem if a user changes the OS color theme.  I just noticed that info I gave above for the Vista color settings was incorrect.  It should have been:

    Control Panel -> Appearance and Personalization -> Personalization - > Windows Color and Appearance -> Advanced

    When you use the OS colors, you need to apply them in their foreground-background pairs.

     

    Thursday, February 2, 2012 4:29 PM
  • I think you need to provide explicit color value.

    Do you have source code for this application?


    java
    Saturday, February 4, 2012 6:53 AM