OpenAnimation

Applies to

Window controls

Description

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

Usage

The OpenAnimation property takes a value of the WindowAnimationStyle enumerated variable. For “slide” values, the whole window appears to slide into view from the direction selected. For “roll” values, the window is painted 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.

Some controls, such as InkEdit, InkPicture, and RichTextEdit controls, may not paint properly when you use animation features. For example, if you place an InkPicture control on a window, the image in the control does not display when the animation completes until the control is clicked.

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 Open event is triggered before the animation starts, allowing any code that changes the size or layout of the window to complete before it is painted.


In a painter

StepsTo set the OpenAnimation property on a window:

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


In scripts

The following example sets the OpenAnimation property of the w_about window to CenterAnimation!:

w_about.OpenAnimation = CenterAnimation!

See also