unit1.pas

来自「DELPHI7编程百例 DELPHI7编程百例 DELPHI7编程百例」· PAS 代码 · 共 53 行

PAS
53
字号
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    ListBox1: TListBox;
    Button1: TButton;
    Edit1: TEdit;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure ListBox1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
      
  end;

var
  Form1: TForm1;
  mydir:string;



implementation
uses unit2;
{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
  Threads: array[0..9] of TSearchFileThread;
begin
  mydir:=Edit1.Text;
  //for i := Low(Threads) to High(Threads) do
  begin
    //Threads[i] := TSearchFileThread.Create(False);
    Threads[0] := TSearchFileThread.Create(False);
  end;
end;

procedure TForm1.ListBox1Click(Sender: TObject);
begin
  ShellExecute(0,nil,PChar(ListBox1.Items.Strings[ListBox1.ItemIndex]),nil,nil,SW_SHOW);
end;

end.
 

⌨️ 快捷键说明

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