⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.pas

📁 delphi 中animate控件使用示例
💻 PAS
字号:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, ComCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    OpenDialog1: TOpenDialog;
    Animate1: TAnimate;
    Animate2: TAnimate;
    Button3: TButton;
    Button4: TButton;
    RadioGroup1: TRadioGroup;
    Button5: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
   animate1.Play(1,animate1.FrameCount ,0);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 animate1.Stop ;
end;


procedure TForm1.Button3Click(Sender: TObject);
var
   index:integer;
begin
index:=radiogroup1.ItemIndex ;
if index=0 then animate2.CommonAVI :=avifindfile;
if index=1 then animate2.CommonAVI :=avicopyfiles;
if index=2 then animate2.CommonAVI :=avideletefile;
animate2.Play(1,animate1.FrameCount ,0);
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
animate2.Stop ;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
if opendialog1.Execute then
   animate1.FileName :=opendialog1.FileName ;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -