有时我们需要在程序运行是知道当前是什么版本,当然查程序文件的属性也只可以看到,但这样太麻烦了。

  可以用以下方法调用:
 
//要在uses中添加引用单元:Version;
 
procedure TForm1.FormSet;
var
  pVer : tVersion;
begin
 
    pVer := Tversion.Create(ParamStr(0));
    x_pVerNo := pVer.FileVersion;
    x_pProgramName := pVer.InternalName;
    x_pComments := pVer.FileDescription;
    pVer.Free;
 
end;


  --本文来源于[TTT BLOG]:http://www.taoyoyo.net/ttt/post/323.html

 

(提示:转载时请务必保留版权信息或者注明来源。)

相关文章:

  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-10-13
  • 2021-06-24
  • 2021-05-11
  • 2021-05-23
相关资源
相似解决方案