Adding a unit automatically to the project
问题 I am working on a component in Delphi 7 and Delphi 2006 , where I am using a unit which I need to add to the .dpr file of the project on which the component is dropped automatically. Like the way Eureka Log automatically adds the unit 'ExceptionLog' to the project file: Can anyone tell me how to programmatically add a unit to the project file when I drop my component on any form in the project? 回答1: You most likely have to use the Open Tools API for that. Also it might require to write a