调用windows的复制文件对话框

function CopyFileDir(sDirName: String;

  sToDirName: String): Boolean;

var

  fo: TSHFILEOPSTRUCT;

begin

  FillChar(fo, SizeOf(fo), 0);

  with fo do

  begin

    Wnd := 0;

    wFunc := FO_COPY;

    pFrom := PChar(sDirName + #0);

    pTo := PChar(sToDirName + #0);

    fFlags := FOF_NOCONFIRMATION + FOF_NOCONFIRMMKDIR;

  end;

  Result := (SHFileOperation(fo) = 0);

end;

 

调用windows的复制文件对话框

 

上一篇:Python获取外网ip,并且保存到本地。


下一篇:【纪中集训】2019.08.01【NOIP提高组】模拟 A 组TJ