How can a component at designtime determine the project directory

Posted by Heinz Z. on Stack Overflow See other posts from Stack Overflow or by Heinz Z.
Published on 2010-03-12T15:06:48Z Indexed on 2010/03/13 0:57 UTC
Read the original article Hit count: 409

Hello,

I write a component which should store some information relative to the project directory. Every time a property of my component is changed it should write a file. So how can a component determine the current project directory at design time.

Thanks in advance

EDIT:
I want to generate a delphi source file every time a property of my component is changed, so that I always get the latest version when I compile my code. Think of it as a kind of code generator.

At the moment I set whole path and filename where the source should be stored but I prefer a relative path to the project (or the form/datamodule which contains my component) to make it easier to copy the project on different developer machines.

© Stack Overflow or respective owner

Related posts about delphi

Related posts about delphi-2010