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

  可以用以下方法调用:
 
//要在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

 

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

posted on 2010-12-16 13:31  sunjun0427  阅读(381)  评论(0编辑  收藏  举报