Arsip: Membaca Ukuran "file-teks"


by delphy in Articles more 18 years ago 2126
Fungsi "FileSize" di dalam delphi tidak bekerja dengan baik ketika kita ingin membaca ukuran file teks.
nahhh.. coba gunakan cara ini:




procedure TForm1.Button1Click(Sender: TObject);
var
SearchRec: TSearchRec;
begin
if OpenDialog1.Execute then
if FindFirst(OpenDialog1.FileName, faAnyFile, SearchRec) = 0 then
Label1.Caption := FloatToStrF(SearchRec.Size/1048576, ffFixed, 7, 2)+' MB';
FindClose(SearchRec);
end;

Silahan dicoba.
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com