Delphi版本号检测判断
2022-12-29 10:51:02 作者:admin
本文整理自网络,侵删。
usesSystem.StrUtils, System.Types
function TFrmMain.CheckVersion(Ver1, Ver2: string): Boolean; //Ver1 网络版本, Ver2 本地版本var v1, v2: TStringDynArray;begin//版本判断 v1 := SplitString(Ver1, '.'); v2 := SplitString(Ver2, '.'); if (Length(v1) <> 4) or (Length(v2) <> 4) then begin Application.MessageBox('版本号错误,无法保证系统更新。', '版本号错误', MB_OK + MB_ICONSTOP); end else begin if v1[0] > v2[0] then begin Result := True; exit end else if v1[1] > v2[1] then begin Result := True; exit end else if v1[2] > v2[2] then begin Result := True; exit end else if v1[3] > v2[3] then begin Result := True; exit end else begin //版本已是最新 Result := False; end; end;
end;
相关阅读 >>
Delphi xe5 程序中标识win max android ios程序代码分别实现
Delphi inttostr 将“整数型”转换成“字符型”
Delphi模拟点击网页中的按钮
Delphi-xe5-开发 android uri简介
Delphi的流操作的语法
Delphi 获取internet缓存文件
Delphi执行cmd命令和bat文件
Delphi 根据字符串找到函数并执行
Delphi 利用sendinput模拟鼠标键盘
Delphi 释放bitmap
更多相关阅读请进入《Delphi》频道 >>
猜你喜欢
联络方式:
400-123-789
邮箱:xiachao@163.com
Q Q:12345678
微信公众号
微信二维码