Skip to content

TFileVersionInfo

High-level component for accessing file version information

Declaration

Source position: fileinfo.pp line 58

type

  TFileVersionInfo = class(TComponent)
  public
    constructor Create;
    destructor Destroy;
    procedure Loaded;
    procedure ReadFileInfo;
  published
    property Enabled: Boolean; {rw}
    property FileName: string; {rw}
    property VersionStrings: TStrings; {r}
    property Filter: TStrings; {rw}
    property Translation: string; {rw}
    property TranslationOnly: Boolean; {rw}
  end;

Description

TFileVersionInfo is a component that provides easy access to version information from executable files. It automatically extracts version strings and supports filtering by key names and translations. The component can be enabled to automatically read version information when properties change.

Properties

Member Visibility Description
Enabled published Controls automatic reading of version information
FileName published File name to read version information from
Filter published List of version string keys to extract
Translation published Language and code page identifier for version strings
TranslationOnly published Controls behavior when specified translation is not found
VersionStrings read only published Extracted version information strings
See all Properties

Methods

Member Visibility Description
Create public Creates a new TFileVersionInfo component
Destroy public Destroys the TFileVersionInfo component
Loaded public Called after component loading is complete
ReadFileInfo public Reads version information from the specified file
See all Methods

Errors

Raises EVersionInfo when translation is not found and TranslationOnly is True.

See also

Name Description
TVersionInfo Low-level class for accessing version information from executable files
EVersionInfo Exception class for version information errors