Help / WLanguage / WLanguage functions / Controls, pages and windows / Window functions
  • Not applying the skin template to one of the project windows
  • ".WDY" file
  • Deploying an application
  • Font
  • Style of controls
  • Internal windows
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Dynamically changes the skin template:
  • of all windows found in the current application,
  • of the windows found in the WINDEV components used by the application,
  • of a specific window found in the project.
  • This function has no effect on the skin templates applied to a report.
  • This function has no effect on the clipped windows. The skin template is not modified.
// Use the "Sea" skin template for all application windows
ChangeSkinTemplate("", "C:\MyApp\Sea.WDY")
// Use the "Emerald" skin template for the current window
ChangeSkinTemplate(MyWindow.Name, "EmeraldWDY")
<Result> = ChangeSkinTemplate(<Element to modify> , <New skin template> [, <WLanguage procedure>])
<Result>: Boolean
  • True if the skin template was modified,
  • False if a problem occurred.
<Element to modify>: Constant or character string
This parameter can correspond to:
"" (empty string)The new skin template will be applied to all windows found in the current application (including the windows found in the WINDEV components used by the application).
In a .NET assembly generated by WINDEV, the new skin template will be applied to all windows found in the current assembly and to all windows found in the WINDEV .NET assemblies that are loaded in parallel by the application.
AllComponentsThe new skin template will be applied to the windows found in all the WINDEV components used by the application
"<Window name>"The new skin template will be applied to the specified window
<New skin template>: Character string
Name of the skin template to be applied (name and path of the "*.WDY" file, if necessary). If this parameter corresponds to an empty string (""):
  • the skin template defined in the window editor will be applied by default.
    Caution: If a skin template has been dynamically set with ChangeSkinTemplate, it will take precedence.
  • the windows already opened will keep the current skin template.
<WLanguage procedure>: Optional procedure name
WLanguage procedure ("callback" procedure) called when the skin template is applied to an internal window further to the call to ChangeSourceWindow.
This procedure has the following format:
PROCEDURE <Procedure name>(<Destination internal window>, <Skin template>)
  • <Destination internal window> is a Control variable corresponding to the internal window to which the skin template is applied.
  • <Skin template> is a string corresponding to the name of the skin template used.

Not applying the skin template to one of the project windows

To avoid applying the skin template to one of the project windows:
  1. Open the description of the corresponding window.
  2. On the "Style" tab, check "Always keep the initial style/skin template".
  3. Validate.

".WDY" file

The description of a skin template is stored in a ".WDY" file.
The ".WDY" files corresponding to the skin templates proposed by WINDEV are provided with WINDEV.
  • When creating a skin template, the ".WDY" file is automatically created.
  • To generate the ".WDY" file of an existing skin template, open the "<NameOfSkinTemplate>.STY" file in WINDEV and save this file (Backup icon).

Deploying an application

When creating the setup program of your application, the following elements must be added into the list of elements to install:
  • the ".WDY" file of the new skin template set with ChangeSkinTemplate.
  • the image files used by the new skin template applied by ChangeSkinTemplate.
Caution: The images must have different names in the different skin templates used otherwise these images will not be modified. For the buttons, the image of the button is not affected by the change, only the image of the border is replaced by the image of the skin template.
Remark: To add one or more elements to the list of project elements:
  1. On the "Project" tab, in the "Project" group, expand "List of elements" and select "List of project elements".
  2. Click the "Add" button.
  3. Select the files to add and validate.


Dynamically loading skin templates has no effect on the font of the static controls. Indeed, systematically changing the font could trigger unexpected display effects (truncated or overlapping text) because the size of the static controls changes with the font.
If a change of font must be done when a new skin template is applied through programming, use Font in addition to ChangeSkinTemplate.

Style of controls

ChangeSkinTemplate dynamically changes the skin template of ALL the controls (controls linked to a project style or dissociated controls). To apply the style of a skin template to some controls only, apply ChangeStyle to the relevant controls.
Remark: You also have the ability to copy the style of a control to another one via Style.

Internal windows

Internal windows have the "Before changing skin template" and "After changing skin template" optional events.
These events can be used to save and reapply specific properties to internal window controls when changing the skin template. You can also change one or more characteristics of the controls depending on the skin template applied. For more details, see Events associated with internal windows.
Related Examples:
WD Changing Skin Templates Training (WINDEV): WD Changing Skin Templates
[ + ] The “WD Changing Skin Templates” example presents a solution allowing the users to dynamically change skin templates.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Alterar o Style do projeto inteiro
If combo_Style..displayvalue = “azul”


Else If combo_Style..displayvalue = “amarelo”


Else If combo_Style..displayvalue = “vermelho”


23 Mar. 2024

sFileSkin is string = "C:\WINDEV 23\Personal\Templates\WD\110 Office2007\Office2007.wdy"
IF fFileExist(sFileSkin) = True
IF ChangeSkinTemplate("",sFileSkin) = False THEN



01 Mar. 2019

Last update: 06/11/2024

Send a report | Local help