home *** CD-ROM | disk | FTP | other *** search
- unit Unit1;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls,
- UCAniIcon;
-
- type
- TForm1 = class(TForm)
- Timer1: TTimer;
- procedure FormCreate(Sender: TObject);
- procedure FormDestroy(Sender: TObject);
- procedure Timer1Timer(Sender: TObject);
- private
- { Private declarations }
- ani: TAniIcon;
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- ani := TAniIcon.Create;
- ani.LoadFromFile ('c:\windows\cursors\s_busy.ani');
- ani.BackgroundColor := Self.Color;
- Caption := ani.Title;
-
- Timer1.Interval := 50;
- Timer1.Enabled := True;
- end;
-
- procedure TForm1.FormDestroy(Sender: TObject);
- begin
- ani.Free;
- end;
-
- procedure TForm1.Timer1Timer(Sender: TObject);
- begin
- ani.Animate;
- ani.Draw (Canvas, Rect (0, 0, ani.Width, ani.Height));
- end;
-
- end.
-
-