Class TDemoForm (unit Palform)

Inherits from

TForm

Demostration of palettes and animation in a Delphi component. Copyright © 1997 Tempest Software, Inc. This program demonstrate some simple uses for a display palettet in Windows, including palette animation. Palette animation works only with video adapters that use a system palette, so if the display does not use a palette, the animation start button is disabled. Most of the interesting stuff is in the PalDemo.pas file, which implements the TPaletteDemo component. This is the main form, which creates the TPaletteDemo component and animates it. The info button pops up a dialog that displays some information about the video driver.

Constructors



Functions

procedure FormCreate(Sender: TObject);


procedure InfoButtonClick(Sender: TObject);

Check the display.

procedure PaletteDemoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

If the mouse is over the palette control, update the pixel color.

procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure StartButtonClick(Sender: TObject);


procedure StopButtonClick(Sender: TObject);


procedure TimerTimer(Sender: TObject);


Properties

Events

Variables

InfoButton : TBitBtn;


PaletteDemo : TPaletteDemo;


Panel1 : TPanel;


PixelLabel : TLabel;


StartButton : TButton;


StopButton : TButton;


Timer : TTimer;



Constructors


Functions


procedure FormCreate(Sender: TObject);


procedure InfoButtonClick(Sender: TObject);

Check the display. If it does not use a palette, then do not try to animate the palette.


procedure PaletteDemoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

If the mouse is over the palette control, update the pixel color.


procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);


procedure StartButtonClick(Sender: TObject);


procedure StopButtonClick(Sender: TObject);


procedure TimerTimer(Sender: TObject);


Properties


Events


Variables


InfoButton : TBitBtn;


PaletteDemo : TPaletteDemo;


Panel1 : TPanel;


PixelLabel : TLabel;


StartButton : TButton;


StopButton : TButton;


Timer : TTimer;