[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 1991

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 its descendants when created using the Create(Owner) method.

If the resource file 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 resource-less 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.


Version 3.2 Generated 2024-02-25 Home