[Overview][Resource strings][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'daemonapp' (#fcl)

# TDaemon

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Daemon class for visual development

## Declaration

Source position: daemonapp.pp line 76

`type TDaemon = class(TCustomDaemon)`
`protected`
`function Start; override;`
`function Stop; override;`
`function Pause; override;`
`function Continue; override;`
`function Execute; override;`
`function ShutDown; override;`
`function Install; override;`
`function UnInstall; override;`
`function HandleCustomCode(); override;`
`public`
`property Definition;`
`property Status;`
`published`
`property OnStart: TDaemonOKEvent; [rw]` |  | Daemon start event
`property OnStop: TDaemonOKEvent; [rw]` |  | Daemon stop event
`property OnPause: TDaemonOKEvent; [rw]` |  | Daemon pause event
`property OnContinue: TDaemonOKEvent; [rw]` |  | Daemon continue
`property OnShutDown: TDaemonEvent; [rw]` |  | Daemon shutdown
`property OnExecute: TDaemonEvent; [rw]` |  | Daemon execute event
`property BeforeInstall: TDaemonEvent; [rw]` |  | Called before the daemon will be installed
`property AfterInstall: TDaemonEvent; [rw]` |  | Called after the daemon was installed
`property BeforeUnInstall: TDaemonEvent; [rw]` |  | Called before the daemon is uninstalled
`property AfterUnInstall: TDaemonEvent; [rw]` |  | Called after the daemon is uninstalled
`property OnControlCode: TCustomControlCodeEvent; [rw]` |  | Called when a control code is received for the daemon
`end;`

## Inheritance

`TDaemon` |  | Daemon class for visual development
`TCustomDaemon` |  | Base daemon application class
`TDataModule`
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## Description

TDaemon is a TCustomDaemon descendent which is meant for development in a visual environment: it contains event handlers for all major operations. Whenever a TCustomDaemon method is executed, it's execution is shunted to the event handler, which can be filled with code in the IDE.

All the events of the daemon are executed in the thread in which the daemon's controller is running (as given by DaemonThread), which is not the main program thread.

## See also

TCustomDaemon |  | Base daemon application class
TDaemonController |  | Internal daemon controller class

The latest version of this document can be found at lazarus-ccr.sourceforge.net .