help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Types][Classes] Reference for unit 'CustApp' (#fcl)

Reference for unit 'CustApp'

Custom application class

uses

  SysUtils,

  Classes;

Overview

The CustApp unit implements the TCustomApplication class, which serves as the common ancestor to many kinds of TApplication classes: a GUI application in the LCL, a CGI application in FPCGI, a daemon application in daemonapp. It introduces some properties to describe the environment in which the application is running (environment variables, program command-line parameters) and introduces some methods to initialize and run a program, as well as functionality to handle exceptions.

Typical use of a descendent class is to introduce a global variable Application and use the following code:

Application.Initialize;
  Application.Run;

Since normally only a single instance of this class is created, and it is a TComponent descendent, it can be used as an owner for many components, doing so will ensure these components will be freed when the application terminates.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505