Delphi - Displaying App. Name/Version in Titlebar
2
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+']';






AppName := Copy(ExtractFileName(Application.ExeName),
1, Pos('.',ExtractFileName(Application.ExeName))-1)
Exename example: Chat.Client.exe