There is nothing wrong with your television set. Do not attempt to adjust the picture.
The VersionInfo library basically just wraps the Win32 GetFileVersionInfo (and related) API functions. The library makes it very easy to read values from the Version Info resource of Windows executables and DLLs.
TApplication class with a version info property.
The TApplicationVersion class contains the core functionality of the library. The following is the public interface of the class:
TApplicationVersion = class public constructor Create(const Filename: string); destructor Destroy; override; class function VersionToString(Version: int64): string; class function StringToVersion(const Value: string): int64; function GetString(const Key: string; LanguageID: integer; CharsetID: integer): string; overload; function GetString(const Key, TranslationID: string): string; overload; function GetString(const Key: string; Index: integer = 0): string; overload; property Valid: boolean; property Strings[const Key: string]: string; default; property FileVersion: int64; property ProductVersion: int64; property FileFlags: DWORD; property OS: DWORD; property FileType: DWORD; property FileSubType: DWORD; property FileDate: int64; property LanguageID[Index: integer]: WORD; property CharsetID[Index: integer]: WORD; property LanguageNames[Index: integer]: string; property TranslationCount: integer; end;
As a bonus there’s also a class helper that extends TApplication with a version info property:
TApplicationVersionHelper = class helper for TApplication public property Version: TApplicationVersion; end;
To enable the class helper you just include the ApplicationVersionHelper unit in your uses clause.
Read the version number from a file and display it in a message box
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | uses VersionInfo; ... const Filename = 'foobar.exe'; var FVersionInfo: TVersionInfo; Version: string; begin FVersionInfo := TVersionInfo.Create(Filename); try Version := TVersionInfo.VersionToString(FVersionInfo.FileVersion); finally FVersionInfo.Free; end; ShowMessage(Format('The file %s has version %s', [Filename, Version])); end; |
Set the application title to the description value specified in the version resource
1 2 3 4 5 6 7 8 | uses Forms, VersionInfo, ApplicationVersionHelper; // Enable the class helper ... begin Application.Title := Application.Version['FileDescription']; end; |
| D1 | D2 | D3 | D4 | D5 | D6 | D7 | D2005 | D2006 | D2007 |
Note: The library has only been tested with Delphi 2007, but apart from the class helper, which requires Delphi 2006 or later, I would think the code can be adapted for Delphi 4 and later with minimal modifications.

This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 Unported License.
| Download: | VersionInfo for Delphi |
|---|---|
| Version: | 1.1 |
| Updated: | 2 March, 2008 |
| Size: | 9.62 KB |
| Notes: | |
| Downloads: | 1,860 |
I don't know how to convert this to Delphi 7 - without using class helper…pls give me an idea how…
Doesn't the
TVersionInfoclass (see Example 1 above) work for you?Sorry for the late reply sir
I'm from the Philippines so i'm limited with internet connection (not 24/7) and I thank you for the prompt response. Yes sir Example 1 did work for my Delphi 7 but I was talking about
VersionInfoDemo.dprthat was attached as a demo on VersionInfo0101.zip. It uses class helper and I can't convert it or modify it so I can also read these - 'Comments', 'CompanyName', 'FileDescription', 'InternalName', 'LegalCopyright', 'LegalTrademarks', 'OriginalFilenam', 'PrivateBuild', 'ProductName', 'SpecialBuild'Just use the
Stringsproperty of theTVersionInfoclass. E.g. something like this:or this:
It worked! Thank you very much Sir…..