rt

解决方案 »

  1.   

    如果是用delphi自带的DirectoryListBox就可这样DirectoryListBox1.Directory:='d:\test';
      

  2.   

    用函数
    selectDirectory就可以做到
      

  3.   

    This example uses a button and a label on a form. When the user clicks the button, a Select Directory dialog box appears. The current directory displayed in the dialog box is C:\MYDIR. The user can select a directory from the directory list, or enter a new directory in the edit box. If the user enters a new directory, a message box asks the user if the directory should be created. If the user chooses Yes, the directory is created. If the user chooses No, the message box goes away without creating the directory. The name of the directory the user selects appears as the caption of the label:uses FileCtrl;const
      SELDIRHELP = 1000;
    procedure TForm1.Button1Click(Sender: TObject);
    var
      Dir: string;
    begin
      Dir := 'C:\MYDIR';
      if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then
        Label1.Caption := Dir;
    end;
      

  4.   

    我的意思不是用什么控件,是用windows 2000  的"资源管理器",是用编程的方法打开一个"资源管理器",并选择一个文件.就象网络蚂蚁、flashget,单击“打开下载的文件目录”后,弹出windows的资源管理器,并选中一个文件.是用shellapi的函数shellexecute可以打开"资源管理器",但我不知道怎么自动选中一个文件.
      

  5.   

    UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!UP!!!!!
      

  6.   

    iamdelphiman(小程):我有个想法:
    1.先用ShellExecute打开文件夹(是没有问题的),出现资源管理器窗口;
    2.取得资源管理器窗口的句柄,进而取得listview的句柄(没有问题);
    3.用postmessage发消息到listview中,让它选中我们所要选中的文件(我试了好多次都不行)
    。可以用SPY++查看资源管理器窗口的类结构。