3
votes

Exists the possibility for declare (uses) a UNIT in Project (.DPR or other location) and show in All Forms? (without necessary redeclare uses in Form the Form), a Global UNIT declarated one time in Project and visible to All Form/Units.

2

2 Answers

5
votes

No. You can't use a unit in a single place and make it visible globally. It has to be included in a uses clause in each unit's interface or implementation section in order to be visible in that unit. The Delphi compiler automatically makes System (and in recent Delphi versions SysInit) be included in each unit, but there's nothing that will do that for your own units.

1
votes

The feature you ask is not existing. But your can do something that has the same effect: use a .inc file.

Create a .inc file with the list of all common units you require. The add this include file in the uses clause of all unit.