Delphi做的程序,如果想包含版本信息, 必须在Delphi的集成编辑环境的菜单“Project/Options/Version Info”里面添加版本信息.即在Version Info 选项卡中选中“Include version information in project”项,并在“Module version number”中设置Major version(主版本号). Minor version(副版本号). Release(发行版本号). Build(内部版本号). 设置好后,在程
function GetApplicationVersion:String; // Added 取得程序版本号 var FileName:String; InfoSize,Wnd:DWORD; VerBuf:Pointer; VerInfo:^VS_FIXEDFILEINFO; begin Result:='0.0.0.0'; FileName:=Application.ExeName; InfoSize:=GetFileVersionInfoSize(PChar(FileName),Wnd);
Borland Compiler Conditional Defines Edit Talk1 2,909PAGES ONTHIS WIKI Product Name Version Conditional Define CompilerVersion Embarcadero RAD Studio XE6 20.0 VER270 27 Embarcadero RAD Studio XE5 19.0 VER260 26 Embarcadero RAD Studio XE4 18.0 VER
The CompilerVersion constant identifies the internal version number of the Delphi compiler. It is defined in the System unit and may be referenced either in code just as any other constant: if CompilerVersion = 20 then sCompilerName := 'Delphi 2009';