CloseAnimation

Applies to

Window controls

Description

Specifies an optional animation effect that displays when the window closes.

Usage

The CloseAnimation property takes a value of the WindowAnimationStyle enumerated variable. For “slide” values, the whole window appears to slide from the direction selected. For “roll” values, the window does not move but its display is cleared from the direction selected. Values are:

You can modify the animation properties at any time and use them for any window type. They are most often used in pop-up windows.

FadeAnimation! can be used only in top-level windows. It does not work in child windows. In MDI applications, you cannot use FadeAnimation! for sheet windows. Fading affects the transparency of the window, and sheet windows in MDI applications always inherit the transparency of the frame window.

Also, if the Transparency property of a frame or main window is set to a value above 0, the TopRoll!, BottomRoll!, LeftRoll!, RightRoll!, and CenterAnimation! settings do not work with sheet windows or child windows. All settings work correctly for frame windows.

While the animation executes, the application waits for it to complete. Use the AnimationTime property to control the number of milliseconds the animation takes to execute.

The window’s CloseQuery event is triggered before the animation begins. The Close event is triggered when the animation has completed.


In a painter

StepsTo set the CloseAnimation property on a window:

  1. Select a value from the CloseAnimation drop-down list on the General page of the window’s Properties view.


In scripts

The following example sets the CloseAnimation property of the w_splash window to FadeAnimation!:

w_splash.CloseAnimation = FadeAnimation!

See also