同意
kevin_gao(困了!累了!睡觉了!) 

解决方案 »

  1.   

    不是很明白你的意思!试试吧
    昨天刚学到的,ExtractFileDir(Application.ExeName),返回可执行文件所在的目录.
    当然,一般情况下用GetCurrentDir()或者Getdir也可以!
    再不行就用Savedialog或者Opendialog,再dialog compenents中
      

  2.   

    如果想得到某个文件所在文件夹的路径,可以试试getcurrentdir()
      

  3.   

    实现的功能如:在桌面上新建一个快捷方式,出现一个对话框,在"键入项目的位置"点击右边的浏览按钮,然后出现的界面.
    就要那种界面的.SelectDirectory与之相差太大了
      

  4.   

    uses  ShlObj;function GetFolder(aRoot: integer; aCaption :string): string;
    var
      pPrograms,pBrowse: PItemIDList;
      hBrowseInfo: TBROWSEINFO;
      hPChar: PChar;begin
      if (not SUCCEEDED(SHGetSpecialFolderLocation(Getactivewindow, aRoot,
                        pPrograms))) then
        EXIT;
      hPChar := StrAlloc(max_path);
      with hBrowseInfo do
      begin
        hwndOwner := Getactivewindow;
        pidlRoot := pPrograms;
        pszDisplayName := hPChar;
        lpszTitle := pChar(aCaption);
        ulFlags := BIF_RETURNONLYFSDIRS;
        lpfn := nil;
        lParam := 0;
      end;  pBrowse := SHBrowseForFolder(hBrowseInfo);
      if (pBrowse <> nil) then
        if (SHGetPathFromIDList(pBrowse, hPChar)) then Result:= hPChar;
      StrDispose(hPChar);end;
    条用:
    GetFolder(0,'请选择所需的路径:');
      

  5.   

    var
     str_dir:string;
    showmessage(getdir(0,str_dir));
      

  6.   

    对不起,浪费大家的时间了.我没有仔细看帮助文件
    使用
    var s:string;
    然后使用selectdirectory('选择文件夹','',s)就能够达到需要的效果