procedure TForm1.FormShow(Sender: TObject);
begin
AddFile(Edit1.Text+'*.*',faAnyFile)
end;
Бу процедура қуйидаги кўринишга эга.
function TForm1.AddFile(FileMask: string; FFileAttr:DWORD): Boolean;
var
ShInfo: TSHFileInfo;
attributes: string;
FileName: string;
hFindFile: THandle;
SearchRec: TSearchRec;
function AttrStr(Attr: integer): string;
begin
Result
if (FILE_ATTRIBUTE_DIRECTORY and Attr) > 0 then Result := Result + '';
if (FILE_ATTRIBUTE_ARCHIVE and Attr) > 0 then Result := Result + '
A
';
if (FILE_ATTRIBUTE_READONLY and Attr) > 0 then Result := Result + '
R
';
if (FILE_ATTRIBUTE_HIDDEN and Attr) > 0 then Result := Result + '
H
';
if (FILE_ATTRIBUTE_SYSTEM and Attr) > 0 then Result := Result + '
S
';
end;
begin
ListView1.Items.BeginUpdate;
ListView1.Items.Clear;
Do'stlaringiz bilan baham: |