如何用TOpenDialog对象,双击打开一个链接的文件.就象在windows的目录里操作一样.

解决方案 »

  1.   

    用Sample页面下的DirectoryOutline控件
      

  2.   

    不是这样的,我是要打开文件,而不是目录.
    比如里面有一个DOC文件我能否通过双击打开WORD并以这个DOC文件为当前文件.
      

  3.   

    那你可以自己加上打开的语句呀if OpenDialog1.Execute then
      //---> your operation;
      

  4.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      if OpenDialog1.Execute then
        ShellExecute(0, 'open', PChar(OpenDialog1.FileName), nil, nil, SW_SHOW);
    end;