function GetCurrentDir: string;
GetCurrentDir returns the fully qualified name of the current directory.

解决方案 »

  1.   

    好像是Application.exxxx具体忘了,打Application.查一下.
      

  2.   

    Application.ExeName;

    ParamStr(0)
      

  3.   

    sorry,刚才的是可执行文件名带全路径。
      

  4.   

    如果是自己程序就用Application->ExeName,如果是别的程序就用GetCurrentDir。
      

  5.   

    extractfilepath(application.exename)
    执行效果是:路径名后加'\'
      

  6.   

    ExtractFileDir 也可以,他和 ExtractFilePath 区别在于返回串少了一个'\' ;
    在程序运行起来时用 GetCurrentDir 是可以得到当前可执行文件路径,但当你运行了
     OpenDialog , SaveDialog 或 Explorer.exe 后,再用 GetCurrentDir 时,返回的结果就不同了。
      

  7.   

    同意sundayboys(找回自我中......)
    GetCurrentDir 只是返回当前路径,你改变当前路径了,当然返回的结果就不同了