procedure TMainForm.Button2Click(Sender: TObject);
var
lStream: TFileStream;
begin
if OpenDialog1.Execute then
begin
lStream := TFileStream.Create(OpenDialog1.FileName, SysUtils.fmOpenRead);
try
jsDialogs.ShowMsg('File size in bytes: ' + SysUtils.IntToStr(lStream.Size), '');
finally
lStream.Free;
end;
end;
end;