delphi 字节数转换为KB或MB字符串


本文整理自网络,侵删。

 
function BytesToStr(iBytes: Integer): String;
var
iKb: Integer;
begin
iKb := Round(iBytes / 1024);
if iKb > 1000 then
Result := Format(‘%.2f MB‘, [iKb / 1024])
else
Result := Format(‘%d KB‘, [iKb]);
end;

相关阅读 >>

Delphi memo1 行倒序排列三种方法

Delphi获得硬盘所有分区

Delphi adoquery查询更改用户

Delphi not 与整数

Delphi xe 播放 gif 动画

Delphi 在电脑屏幕上显示图片

Delphi 正则表达式校验手机号

Delphi 类的声明

Delphi 用input连续记录所输入的次数

cvcode.pas

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...