1、放各种组件。
2、在事件中编写代码。
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
dcDiskScanner1.SearchMask:=Edit1.Text;
dcDiskScanner1.IncludeSubfolders:=false;
dcDiskScanner1.Folder:=self.dcFolderEdit1.Text;
dcDiskScanner1.Execute;
end;
procedure TForm1.dcDiskScanner1FileFound(Sender: TObject; const FileName,
FileType: String; const FileSize: Extended; const FileTime: TDateTime;
const FileAttributes: TdcScanAttributes; const LargeIcon,
SmallIcon: TIcon; SysImageIndex, TotalFiles: Integer;
const TotalSize: Extended);
begin
self.CheckListBox1.Items.Add(filename);
end;
3、创建组件模板。
4、使用组件模板。