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

# TCustomDaemonApplication.CreateForm

Create a component

## Declaration

Source position: daemonapp.pp line 371

`public procedure TCustomDaemonApplication.CreateForm(`
`InstanceClass: TComponentClass;`
`var Reference`
`); virtual;`

## Arguments

`InstanceClass` |  | Class pointer of component instance to create
`Reference` |  | Variable to store the instance pointer in.

## Description

CreateForm creates an instance of InstanceClass and fills Reference with the class instance pointer. It's main purpose is to give an IDE a means of assuring that forms or datamodules are created on application startup: the IDE will generate calls for all modules that are auto-created.

## Errors

An exception may arise if the instance wants to stream itself from resources, but no resources are found.

## See also

TCustomDaemonApplication.CreateDaemon |  | Create daemon instance

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