how to refresh window appearance.. RRS feed

  • Question

  • Hiya. I'm currently using win xp, and using the classic theme.

    My goal was to display the whole system with a 'flat' look (as opposed to standard 3d look),
    and this is achievable by modifiying the value of ButtonHilight, ButtonLight and ButtonShadow on the HKEY_CURRENT_USER\Control Panel\Colors\ so that they have the same value, so there is no white highlight or black shadow to create the typical 3d look windows default (by default, buttonhilight and buttonlight has the value of some bright colour, and buttonshadow has the value of a dark colour, so these colours will create the 3d look of typical windows forms. note that they can't be change through control panel->display->appearance)

    the problem is, if I want to experiment and change the colour of the 3d objects (through control panel->display->appearance), the value of buttonhilight, buttonlight and buttonshadow will be restored to the old default values, so they will display the bright highlight and dark shadow (therefore, restoring the 3d look again), and if i want to keep the flat scheme, i've to reedit the registry, then restart.

    my question is, is there an api call somewhere that would allow me to reload the windows appearance colours from the registry without having to restart the computer, nor to use the controlpanel->display->appearance->apply.

    thanks alot.
    Monday, September 19, 2005 9:58 AM


  • SetSysColors, same as it has been since Windows 2.0
    Wednesday, September 21, 2005 5:21 PM

All replies

  • SetSysColors, same as it has been since Windows 2.0
    Wednesday, September 21, 2005 5:21 PM
  • I am currently developing a .NET 2.0 application for a barge company. This is a Windows application that will run on thier tow boats. The application is based on an older application done in VB 6.0.  One of the features they have is to switch to a night mode, where all the system colors are changed to enable the screen to appear mostly black with green font.  This works well with the older versions of Windows or Windows XP with the theme set to Classic Windows. 


    My question is there a way to achieve the same look using the Windows XP theme?  I've run through all the system color values 0 thru 30 (25 ommitted) and I still don't get the same effect.  The main problem is the forms main title bar. It remains blue.  I've searched high and low for other system constants outside of the 31 posted everywhere.  I'm wondering if there is another way to do this.  Or is there possibly a way to switch the theme from Custom or XP to classic when the user selects 'night' mode, and then back to the original theme when switching back to 'day' mode?


    Any help would be greatly appreciated.


    PS - I've never seen Windows 2.0.  Post a screen shot if you have one. lol

    Friday, December 22, 2006 3:23 PM
  • There's no way to change the appearance of the title bars when Aero is selected.

    You cannot switch to the Windows Standard or Windows Classic color scheme without user intervention, but you could switch to "High Contrast Black" using SystemParametersInfo(SPI_SETHIGHCONTRAST), when you call it again to turn High Contrast off, Aero will be restored.

    Thursday, January 4, 2007 2:16 AM