home *** CD-ROM | disk | FTP | other *** search
- unit filedemo;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, Buttons, FileCtrl, psflfind;
-
- type
- TDemoFileFind = class(TForm)
- FileFind1: TFileFind;
- DriveComboBox1: TDriveComboBox;
- Label1: TLabel;
- Label2: TLabel;
- Edit1: TEdit;
- ListBox1: TListBox;
- Label3: TLabel;
- BitBtn1: TBitBtn;
- Label4: TLabel;
- procedure BitBtn1Click(Sender: TObject);
- procedure BitBtn2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- DemoFileFind: TDemoFileFind;
-
- implementation
-
- {$R *.DFM}
-
- procedure TDemoFileFind.BitBtn1Click(Sender: TObject);
- begin
- listbox1.clear;
- Screen.cursor := crHourglass;
- FileFind1.Filename := Edit1.text;
- Filefind1.SearchDrive := copy(drivecombobox1.text,1,2);
- Filefind1.filefirst;
- while length(filefind1.foundfile) > 0 do
- begin
- listbox1.items.add(filefind1.foundfile);
- filefind1.filenext;
- end;
- Screen.cursor := crDefault;
- end;
-
- procedure TDemoFileFind.BitBtn2Click(Sender: TObject);
- begin
- close;
- end;
-
- end.
-