This is a demo to demonstrate the Windows API call 'AnimateWindow' which enables you to produce special effects when showing or hiding windows. This program has also been featured on the delphi.about.com site (link at the bottom).

There are four types of animation: roll, slide, collapse or expand, and alpha-blended fade. You can change all settings on the right, which automatically shows you the exact API call used.

Arguments:

Time: The time it takes to play the animation, in milliseconds. Typically, an animation takes 200 milliseconds to play.

Style: Collapse: Makes the window appear to collapse inward or expand outward. (hide/show) Slide: Uses a slide/roll animation. Blend: Uses a fade effect. This flag can be used only if hwnd is a top-level window.

Direction: This is only valid for 'Slide', otherwise it gets ignored anyway. This animates the window from one side to another. Directions can be combined.

Links:

MSDN page

delphi.about.com article

Download:

Source (22,9 KB)

Executable (591 KB)