Eli pitääkös tää koodi kirjottaa buttonin onclick tapahtumiin?
Koodi:
var searchResult : TSearchRec;
begin // Try to find regular files matching Unit1.d* in the current dir if FindFirst('Unit1.d*', faAnyFile, searchResult) = 0 then begin repeat ShowMessage('File name = ' searchResult.Name); ShowMessage('File size = ' IntToStr(searchResult.Size)); until FindNext(searchResult) 0;
// Must free up resources used by these successful finds FindClose(searchResult); end; end;
Vastaukset 2
Vanhimmat
malli: http://www.delphibasics.co.uk/RTL.asp?Name=TSearchRec
Eli pitääkös tää koodi kirjottaa buttonin onclick tapahtumiin?
Koodi:
var
searchResult : TSearchRec;
begin
// Try to find regular files matching Unit1.d* in the current dir
if FindFirst('Unit1.d*', faAnyFile, searchResult) = 0 then
begin
repeat
ShowMessage('File name = ' searchResult.Name);
ShowMessage('File size = ' IntToStr(searchResult.Size));
until FindNext(searchResult) 0;
// Must free up resources used by these successful finds
FindClose(searchResult);
end;
end;