Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

FileName property

Project: Version Information Component

Unit: PJVersionInfo

Class: TPJVersionInfo

Applies to: ~>3.0

property FileName: string;

Description

Specifies the file from which version information is to be read. A full path name should be provided.

Assigning a file name to this property at run time causes the given file to be checked for version information. The HaveInfo property indicates whether any information was found in the file. When a value is assigned to FileName at design time the component does not immediately check the file for version information – this occurs when the component is created at run-time.

If FileName is assigned the empty string ('') at run time the component reads version information from the host program file. The FileName property is then set to program file’s name. When '' is assigned to FileName at design time it retains this value until run-time when the program name is substituted. This arrangement works well when the component is hosted in an application. When the component is part of a DLL FileName may not behave as expected.

The default value for FileName is the empty string. This enables the component to automatically read version information from its program file without the user setting any properties or intervening if the program’s executable file name is changed.