animateWindow

animateWindow(millisecs:   Integer
             animateType: Integer) clientExecution;

The animateWindow method of the Window class enables you to specify special animation effects (roll, slide, collapse, or expand) when showing or hiding a form or . This allows for the display of an animated informational popup window without having to write a significant amount of logic, for example.

Calling the method is equivalent to toggling the visible property of a window where the resulting show or hide of the window or is animated. When the window or is not visible, calling the animateWindow method makes it visible. If the window or is visible, calling the animateWindow method makes it invisible.

The animateWindow method call on a window does not result in any animation being shown if the form is maximized, modal, or an MDI child.

The Window class implementation shows the border and caption of a form, and animates the contents inside it. This does not always produce the best appearance, and Windows does not always draw the animation correctly. If the form:

If the form has not been shown, calling the animateWindow method causes the load method to be executed.

Use the millisecs parameter to specify the duration of the animation, in milliseconds. Typically, an animation takes 200 milliseconds to play.

The animateType parameter can be one of the Window or class constants listed in the following table.

Class Constant Value Description
AnimateWindow_Flags_Activate #20000 Causes the form to be activated when it is shown. If it is not set, the form is shown without it gaining focus. In addition, when not set, the form retains its current zOrder position if it is redisplayed using the animateWindow method.
AnimateWindow_Flags_Blend #80000 Causes the form to fade in or out. (This setting cannot be used with other animation effect options.)
AnimateWindow_Flags_BottomToTop #8 Animates the window from bottom to top. This flag can be used with roll or slide animation. It is ignored when used with AnimateWindow_Flags_Center.
AnimateWindow_Flags_Center #10 Makes the window appear to collapse inward when the window is hidden or expand outward when the window is shown.
AnimateWindow_Flags_LeftToRight #1 Animates the window from left to right. This flag can be used with roll or slide animation. It is ignored when used with AnimateWindow_Center.
AnimateWindow_Flags_RightToLeft #2 Animates the window from right to left. This flag can be used with roll or slide animation. It is ignored when used with AnimateWindow_Flags_Center.
AnimateWindow_Flags_Slide #40000 Uses slide animation. By default, roll animation is used. This flag is ignored when used with AnimateWindow_Center.
AnimateWindow_Flags_TopToBottom #4 Animates the window from top to bottom. This flag can be used with roll or slide animation. It is ignored when used with AnimateWindow_Flags_Center.

The following code fragment examples demonstrate the use of the animateWindow method. In the following example, the method specifies that the control will slide the control into view from right to left when made visible and slide the form out of view right to left when made invisible.

frame1.animateWindow(200, Window.AnimateWindow_Flag_Slide + 
                     Window.AnimateWindow_Flag_RightToLeft);

In the following example, the method specifies that the form will roll into view from the top left corner when made visible and roll the form out of view towards the top left corner when made invisible.

frame1.animateWindow(200, Window.AnimateWindow_Flag_RightToLeft + 
                     Window.AnimateWindow_Flag_TopToBottom);

To animate the show of a form or , position the form or with its final position and size while invisible, and then call the animateWindow method to animate the window into that final position and size.

If the animateType parameter is not valid, the form or is made visible or invisible without any animation.

The animateWindow method is available only in GUI applications and for Jade forms (that is, it is not available for web forms).

An invalid parameter exception is generated if the value of the millisecs parameter is less than zero (0) or greater than 60,000.

The animation may not work effectively if other windows are moved at the same time. This applies to forms or that are docked or aligned to their parents.

2016.0.01