Visual Styles

Window's Visual Style mode can be enabled/disabled for all PPJ controls by setting the SalApplication.VisualStyles flag to true in the Main method when the application starts up.

When Visual Styles styles are on, there are some differences of behavior that need to be taken into account:

  • ListBox control generates the LBN_SELCHANGE notification when the mouse is clicked on the empty area. Therefore, with XP styles on, ListBox controls in ported applications receive a SAM_Click event when clicked on the empty area.

  • The TabControl used in SalQuickTabs, which is the native .NET TabControl that wraps Windows Common Controls, does not support the owner draw mode when XP styles are turned on, therefore disabled tabs cannot be painted as disabled. Additionally, if the orientation of the tabs is different from Top, the tabs are drawn in standard mode because XP does not support painting the tabs in any other orientation.

  • Buttons that should not get the focus, typically on a toolbar, do get the focus anyway when XP styles are turned on.

The SalApplication.VisualStyles flag can be overridden by using the startup switches /xp or /noxp or /visualstyles=on|off.

Last updated