[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

RequireDerivedFormResource

When True every form must have a resource (e.g. a .res file). An exception is raised if the resource is missing when creating a form.

Declaration

Source position: forms.pp line 1823

var RequireDerivedFormResource: Boolean = False;

Description

The form resource is the lfm file compiled into the executable of your application. For this flag it does not matter if it was compiled via an lrs file or via fpcres. The resource is automatically loaded by TForm and therfore any descendant when it is created via Create(Owner). If the resource is missing there is something wrong with either a resource or the unit which contains the faulty form. If the flag is false you will see a blank form and probably search a long time what is wrong. If you set this flag to true you get an exception.

For creating forms without resources you have 3 options:

History: Before 0.9.31 there was no exception. Therefore some resourceless forms might use the standard constructor Create(Owner) and will now get exceptions. This change is Delphi compatible and compatible with TFrame and TDataModule components.

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