File Copy with Progress Bar

后端 未结 6 709
有刺的猬
有刺的猬 2020-11-27 02:58

I used this code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;

namespace Windo         


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 04:00

    Making your own file copy logic by using 2 streams as presented by Gal is a viable option but its not recommended solely because there is a deeply intergrated windows operation which is optimized in reliability, security and performance named CopyFileEx.

    that said, in the following article: http://msdn.microsoft.com/en-us/magazine/cc163851.aspx they do exactly what you want, but ofcourse you have to use CopyFileEx

    Good luck

    ** EDIT ** (fixed my answer, badly witten)

提交回复
热议问题