To give your applications an outstanding touch and to impress the users when starting your applications, the windows can be animated when they are opened and/or closed: a window can turn around when it is opened, coming from the background of the screen, ... (a little bit like video effects).

The effect can be fixed or chosen at random.

This feature can be defined in the options of the project, in the window description or by programming.

If a window loads several elements, an "animation" (performed independently of the current processes) allows the users to wait for the window to be ready!

This feature must be used sparingly to avoid annoying the users. You can for example animate the first window of your application or limit this animation to a specific number of windows.

Open the project description window: under the "Project" section, in the "Project" group, click on "Description".

In the "Advanced" tab, click "Animations of windows".

The window that is displayed allows you to configure the animation:

of the first project window.

all the project windows.

To configure the animation of the first project window:

Choose the animation to perform (opening or closing) and click the "None" link.

In the window that opens, check the "Enable the animation" option and select the animation parameters:

Duration of animation (in hundredths of a second).

Type of animation (if the random mode is chosen, the animation will be automatically selected by the application whenever the window is opened).

It is possible to immediately visualize the chosen parameters thanks to the "Preview" button.

It is also possible to apply the chosen animation to the current window (check the "Animate this description window" option).

Validate.

Remark: A window must necessarily be defined as "First project window".

To configure the animation of all project windows:

Choose the animation to perform (opening or closing) and click the "None" link.

In the window that opens, check the "Enable the animation" option and select the animation parameters:

Duration of animation (in hundredths of a second).

Type of animation (if the random mode is chosen, the animation will be automatically selected by the application whenever the window is opened).

It is possible to immediately visualize the chosen parameters thanks to the "Preview" button.

It is also possible to apply the chosen animation to the current window (check the "Animate this description window" option).

Validate.

Specify the frequency of animations:

Always: the animation will be performed on each application window.

Often: the animation will be performed whenever a window out of ten is opened/closed.

Rarely: the animation will be performed whenever a window out of thirty is opened/closed.

Custom frequency.

Remark: This setting is taken into account by all the windows with no specific setting. For example:

if the opening animation defined for all the project windows corresponds to "None" and if an opening animation was configured for the "WIN_Customer" window, this animation will be performed when opening the "WIN_Customer" window.

if the opening animation defined for all the project windows corresponds to "Custom" and if an opening animation was configured for the "WIN_Customer" window, the animation defined for the "WIN_Customer" window will be performed when this window is opened.

Configuring the animation of windows at window level

To configure the animation of windows at window level:

Open the window to animate in the window editor.

Display the description of the window ("Description" from the popup menu).

In the "Details" tab, choose the type of animation to perform (opening or closing) and click the "None" link.

In the window that opens, check the "Enable the animation" option and select the animation parameters:

Duration of animation (in hundredths of a second).

Type of animation (if the random mode is chosen, the animation will be automatically selected by the application whenever the window is opened).

It is possible to immediately visualize the chosen parameters thanks to the "Preview" button.

It is also possible to apply the chosen animation to the current window (check the "Animate this description window" option).

Validate.

Remark: This setting is applied to the current window even if a different setting was specified at project level.

Configuring the animation of windows by programming

Several WLanguage functions are used to configure the animation of windows:

Modifies the type and duration of animations used when opening the application windows.

These functions can be applied to the windows for which no animation was configured otherwise (from the project editor or from the window editor for example).

WinDisableEffect is used to disable the animation of windows (on a TSE computer with low bandwidth for example).

Automatic feature: Disabling the animation

At any time, the user can disable the animation of windows via "Disable the animations os windows" from the popup menu of the window. This option does not allow you to use the animation of windows on all the project windows.

To avoid proposing this option in the popup menu of windows, you can:

disable the option for all the project windows:

Under "Project", in the group "Project", click on "Description"... The description window of the project is displayed.

In the "Advanced" tab, click on "Menu of AAF"..

Select the "Window" element and uncheck "Disable the animations of windows".

disable the option when necessary, by programming with AAFDisable (or DisableAAF) associated with the aafDisableWindowAnimation constant.

Related Examples:

Unit examples (WINDEV): Animation when opening and closing the windows

[ + ] Using window animations (opening or closing).You also have the ability to see the available animations. You have the ability to modify the different parameters such as the duration of the animation for example.