Главная страница | назад





Article #21943: What is the function of #pragma resource "*.dfm" which appears in all newly generated applications?

Question:

What is the function of the following statement which appears in all newly generated applications?
#pragma resource "*.dfm"

Answer:

This directive marks the current file as a form unit and requires matching .dfm and header files (which are managed by the IDE).  It is necessary for any form units.

If your particular form requires any variables, they must be declared immediately after the pragma resource is used. The declarations must be of the following form:

TFormName *Formname;

Last Modified: 22-NOV-00