unit1.pas

来自「提取网页文件图片地址,应用此工具」· PAS 代码 · 共 46 行

PAS
46
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, mydownfile,downfile,StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  downfile:Tmydownfile;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  downfile.DownDir := 'c:\downpic';
  downfile.HttpDownLoad(edit1.Text ,'c:\downpic\2.jpg',false); 
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 downfile := Tmydownfile.create(self);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
downfile.free;
end;

end.

⌨️ 快捷键说明

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