将c:\123.txt 另存为别的文件,应该将‘c:\123.txt'赋值给savedialog的哪个属性啊?

解决方案 »

  1.   

    if (SaveDialog.Execute) and (SaveDialog.FileName <> '') then
              begin
                                                            
                 copyfile(pchar(path + '123.txt'),pchar    //////path --123.txt的路径(SaveDialog.FileName+'.txt'),false);
              end;
      

  2.   

    initdir:='c:\';
    filename:='123.txt';
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      if (SaveDialog.Execute) and (SaveDialog.FileName <> '') then
              begin             copyfile('c:\123.txt',pchar(SaveDialog.FileName+'.txt'),false);
              end;
    end;