# 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.

{% hint style="info" %}
The *SalApplication.VisualStyles* flag can be overridden by using the startup switches /xp or /noxp or /visualstyles=on|off.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iceteagroup.com/general/ported-application/project-structure/visual-styles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
