O'Reilly logo

Delphi for .NET Developer’s Guide by Xavier Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Animation Example

The animation demo for this section is one in which a background, a clear night’s sky, is invaded by a flying saucer that bounces about, probably looking for someone to abduct. The program is actually quite simple—in fact, much simpler than the Win32 version, which involved using a series of BitBlt() and masking operations to achieve transparency.

Note

The Win32 Version of the application is still around and compiled under VCL.NET. You’ll find it under the CD directory:

\Code\Chapter 07\AnimateVCL

First, let’s look at the class that contains the sprite, the flying saucer. This is shown in Listing 7.22.

Listing 7.22. Declaration of the Sprite
1: type 2: 3: TSpriteDirection = (sdLeft, sdRight, sdUp, sdDown); 4: TSpriteDirections ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required