Unit        : verslab.pas
Description : A TCustomLabel derivative that displays Win32 VersionInfo data
Version     : 1.05, 13 July 1998
Status      : Freeware. 
Contact     : Marc Evans, marc@leviathn.demon.co.uk

History:
    v1.01   : fixed bug stopping LangCharSet from actually doing anything
                at all on a non-UK system.

    v1.02   : Fixed resource leak bug. (surely there can't be any more? It's
                only 6K!) Thanks to Peter Stromblad for finding it.
                1 July 1997

    v1.03   : Added display of flags, tidied up code. Made LangCharSet
                autodetect. Thanks to Fabrice Marguerie
                (FabriceM@compuserve.com) for the flags code.
                29 July 1997

    v1.04   : Added $H+ directive to turn on long strings, otherwise
                the cast to pchar fails.
                07 October 1997

    v1.05   : Amended Application.Exename to GetModuleFileName(). This allows
                TVersionLabel components on forms in DLLs to display the
                version information in that DLL, not the parent app. Added
                InfoString property for reading of version info. Couldn't just
                publish caption because that is writeable which breaks things.
                Also added filename property. '' = current application or DLL,
                any other value is filename to get version info from.
                13 July 1998.

-------------------
Events:
-------------------

No events defined

-------------------
Extra Properties:
-------------------

property VersionResource: TVersionResources;
    This propery can set to display any one of 10 standard version info
    strings.
    TVersionResources = (vrCompanyName, vrFileDescription, vrFileVersion,
                         vrInternalName, vrLegalCopyright, vrOriginalFilename,
                         vrProductName, vrProductVersion, vrComments, vrFlags);

    If vrFlags is selected the VersionResourceKey property is ignored and the
    label displays the contents of the 'private build, special build' etc
    checkboxes in the D3 project options VersionInfo tab.

property VersionResourceKey: string;
    Set this to the name of the key that is to be returned with the
    GetFileVersionInfo call. If one of the 10 standard resource types are
    used this value is set automatically. If you insert a new (non-standard)
    key into the version resource table then set this property to the name
    of the key.

property InfoPrefix: String;
    Sets the text that is displayed in the label before the version
    information string.

property InfoString: string;
    Read only version of the current caption. Available so you can
    programatically access the version info. Publishing caption makes it
    read/write which is not desirable.

property ShowInfoPrefix: boolean;
    If set, the InfoPrefix text will be prepended to the version information
    displayed. If false, only the version information will be displayed.

property LangCharSet: string;
    The API help says (and I quote):
    'Specifies a value in a language-specific structure. The lang-charset
    name is a concatenation of a language and character-set identifier pair
    found in the translation table for the resource. The lang-charset name
    must be specified as a hexadecimal string.'

    This defaults to -1, which means that the component will try to
    figure it out at run time. If you get errors, mail me but try the following
    guidelines as well:

    The first 4 digits of this string are the language code, defaulting to
    0809 for UK English. 0409 is US English, look up VerLanguageName for
    the others. The last 4 digits represent a code page and for most
    environments they should not be changed from the default of 04E4.

property Filename: string;
    The name of the file to query for version info. If '' (default) then
    the current filename is used. (If the versionlabel is on a form in a 
    DLL, the versioninfo in the DLL is used rather than the parent
    application)