avitst.pas

来自「Purpose: --- -- This component is u」· PAS 代码 · 共 66 行

PAS
66
字号
{
  propertys AVIcap:

   BitmapName - name of bitmap sequence;
   ClrUse - bits count of used color
            it is available: pf1bit, pf4bit, pf8bit, pf15bit, pf16bit,
            pf24bit, pf32bit, pfDevice. In present pfCustom NOT AVAILABLE;
   StartFr, EndFr - start frame of sequence and end frame of sequence;
   FileName - AVI file name;
   LengthD - length of digits in Bitmap file name(default 4).
             Example: 'tst0001.bmp' (Idea of Stefan van As Stefan@davilex.nl);
}
unit AVItst;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, AVIcap, CapHelp;

type
  TForm1 = class(TForm)
    Button1: TButton;
    OpenDialog1: TOpenDialog;
    edtStart: TEdit;
    edtEnd: TEdit;
    AVIcap1: TAVIcap;
    procedure Button1Click(Sender: TObject);
    procedure AVIcap1Stop(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var Dr: string;
begin
 GetDir(0,Dr);
 OpenDialog1.DefaultExt:=Dr;
 OpenDialog1.FileName:='*.avi';
 if OpenDialog1.Execute then begin
  AVIcap1.FileName:=OpenDialog1.FileName;
  AVIcap1.StartFr:=StrToInt(edtStart.Text);
  AVIcap1.EndFr:=StrToInt(edtEnd.Text);
  AVIcap1.LengthD:=4;
  AVIcap1.ClrUse:=pfDevice;
  AVIcap1.BitmapName:='tst';
  AVIcap1.Capture;
 end;
end;

procedure TForm1.AVIcap1Stop(Sender: TObject);
begin
 ShowMessage('OK!');
end;

end.

⌨️ 快捷键说明

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