guptateamdeveloper

how to change centura theme at runtime


How to change application theme at run time of an application developed in Team developer. I have already tried Build Settings - General settings, but there I didn't find any option for changing theme at run time.


Solution

  • You change theme programatically at run time using the below mentioned Sal functions,

    SalThemeSet

    bOk = SalThemeSet( ThemeId) Where parameter ThemeId - numeric value that specifies theme.

    Few Supported Theme values are listed below,

    0 - THEME_Default

    1 - THEME_Office2000

    2 - THEME_OfficeXP

    3 - THEME_Office2003

    4 - THEME_Office2003NoThemes

    5 - THEME_Studio2005

    6 - THEME_Studio2008

    7 - THEME_NativeXP

    8 - THEME_Office2007_R1

    9 - THEME_Office2007_R2_LunaBlue

    10 - THEME_Office2007_R2_Obsidian

    11 - THEME_Office2007_R2_Silver

    12 - THEME_Office2007_R3_LunaBlue

    13 - THEME_Office2007_R3_Obsidian

    14 - THEME_Office2007_R3_Silver

    15 - THEME_Office2010_R1

    16 - THEME_Office2010_R2_Blue

    17 - THEME_Office2010_R2_Silver

    18 - THEME_Office2010_R2_Black

    Also you can try SalThemeGet ( ) function for retrieving theme at run time. The function will return numeric theme value. Let me know if you have any more questions on this.