Windows visual styles are a set of customizations that define the appearance of common controls and are directly related to the theme selected in your Windows OS. When an application uses the visual styles, the appearance of its common controls changes to match the look and feel of the theme selected in the Windows OS that the application is running on.
When the visual styles are enabled in Dialog System applications, any Dialog System controls or controls created using the GUI Class Library are displayed using the current visual styles. This does not affect any third-party controls and they appear as before.
The visual styles are not applied by default and must be enabled within your application.
You can enable the visual styles in Dialog System applications in one of the following ways:
Using the manifest applies the visual styles to all controls - both those created by Dialog System and the GUI class library and also to any third-party controls.
This only applies the visual styles to controls created by Dialog System and the GUI class library.
You can enable the visual style fonts within your applications in one of the following ways:
In addition, configuration options for enabling the visual styles and fonts are available in the Dialog System painter. When these options are selected, the painter and the screensets you edit are using the fonts and the appearance of the common controls of the selected Windows theme:
See Changes to Existing Dialog System Applications that Use the Visual Styles in this product Help for information about some of the expected changes when the visual styles and the system fonts are used.
Visual COBOL includes some project templates for creating Dialog System applications. The Dialog System Application (Modern) project template has the visual styles enabled by default.
To enable the visual styles for applications that compile to an executable, add a manifest file to the project that contains the required version of the common controls:
Using the manifest applies the visual styles to all controls - both those created by Dialog System and the GUI class library and also to any third-party controls.
[Use only for testing] For existing Dialog System applications, you need to enable the visual styles manually as follows:
You can set the variable by adding an application configuration file to your project and setting the variable in it, or by specifying the variable in the environment.
This only applies the visual styles to controls created by Dialog System and the GUI class library.
Add the MFVSSW environment variable to your application and set it to /f. This makes the application use the font used for Windows messages as the default font.
You can set the variable by adding an application configuration file to your project and setting the variable, or by specifying the variable in the environment.
You can configure the Dialog System painter to use the visual styles controls and the default system fonts used by the Windows version you are running the painter on. To do this:
Dialog System launches using the new visual styles and fonts.
Alternatively, if starting Dialog System painter from the command line, also set MFVSSW to launch the painter with the visual styles.
When the visual styles and fonts are enabled, the appearance and size of the common controls windows might vary on different Windows operating system and with different visual styles. As a result of this, when you apply the visual styles and fonts to existing Dialog System applications, the UI might be inconsistent on different Windows versions:
See Changes to Existing Dialog System Applications that Use the Visual Styles in this product Help for information about some of the expected changes when the visual styles and the system fonts are used.