-1
即時通訊在DELPHI初學者和我有一個問題.. 如何調用此函數並使用它,我想在一個標籤中顯示結果,也如何聲明功能正確,非常感謝。正確的方式使用獲取大小功能在對象帕斯卡爾
function FindFileSize(Filename:string):integer;
var
sr : TSearchRec;
begin
if FindFirst(filename,faAnyFile-faDirectory,sr) = 0 then
Result := sr.Size
else
raise EFileNotFoundException.Create(filename+' not found.');
FindClose(sr);
end;