Delphi - Displaying App. Name/Version in Titlebar





2
Date Submitted Tue. Oct. 24th, 2006 7:51 AM
Revision 1 of 1
Helper bright
Tags Delphi
Comments 1 comments
This code will get the application title and version information from the project options and display it in the titlebar automatically when the main form is created. The project options are accessed from the Delphi IDE by selecting Project -> Options from the main menu.


uses
  GetVersion {req. for kfVersionInfo}

procedure TForm1.FormCreate(Sender: TObject);
var
  AppName : string;
begin
  AppName := Copy(ExtractFileName(Application.ExeName),
                  1, Pos('.',ExtractFileName(Application.ExeName))-1);
  Application.Title := AppName;
  Caption := AppName + ' [V'+kfVersionInfo+']';

 

Comments

Comments More than one '.'
Sat. Oct. 28th, 2006 3:48 PM    Scripter SCoon

Voting

Votes Down


Scripter ctiggerf