Examples Delphi

Title: Path of a running application
Question: How can I get the path of a currently running application
Answer:
Its easy as a pie. Just put the following code on the required event handler.
MessageDlg('program path = '+ExtractFilePath(Application.ExeName, mtInformation, [mbOk], 0 );