Unit 'Forms' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#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 1987

var RequireDerivedFormResource: Boolean = False;

Description

The form resource is the .frm file compiled into the executable of your application. For this flag, it does not matter if it was compiled via an .ctrs 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.



CT Web help

CodeTyphon Studio