delphi StartCount() 时间计数器
2022-10-27 09:10:04 作者:admin
本文整理自网络,侵删。
{ 1 h=1*60 m=1*60*60 s=1*60*60*1000 hs=3600000hs}
{时间 计时器 00:01:14}//label1.Caption:= StartCount();function StartCount():string;{$j+}const h:Integer=0; m:Integer=0; s:integer=0;{$j-}begin inc(s); if s>=60 then begin Inc(m); s:=0; end; if m>=60 then begin Inc(h); m:=0; end; Result:=Format('%.2d:%.2d:%.2d',[h,m,s]);end;{倒计时}// label1.Caption:=dec1;function dec1():string;{$j+}const i:Integer=60*5;//设置成一个变量{$j-}begin Dec(i); Result:=Format('剩余时间:%d',[i]);end;
相关阅读 >>
Delphi 根据字符串找到函数并执行
Delphi判断按下的是回车键?
Delphi opendialog文件过滤类型
Delphi 打开文件夹并定位到一个文件
Delphi settimer 用法
Delphi 弹出输入框的inputquery, inputquery 函数用法
Delphi meid校验码算法
elphi中取出字符串中指定位置的几个字符
Delphi base64, quoted-printable 的解码与编码函数
正则表达式初学入门
更多相关阅读请进入《Delphi》频道 >>
猜你喜欢
联络方式:
400-123-789
邮箱:xiachao@163.com
Q Q:12345678
微信公众号
微信二维码