Difference between having {$R *.DFM}
directive in interface and implementation section?
what if i have {$R *.DFM}
in interface?
interface
{$R *.DFM}
what if i have {$R *.DFM}
in implementation?
implementation
{$R *.DFM}
It shouldn't make any difference. That instruction ensure that the DFM resource associated with that unit's form gets linked to your executable. All units have access to all resources in the program, so the location of the linking instruction has no effect on the visibility of the resource.
That instruction is placed by the IDE. The IDE can act strangely if you move parts of your code that it's responsible for, so I don't recommend moving the $R
command, even if the compiler accepts it anywhere. Leave it wherever you found it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With