现在正在做一个备份程序,可以支持磁盘、mo、磁带、网络等备份方式。现在想在备份的时候显示进度。应该如何实现?
能不能给个思路,最好还是代码段?
有没有集成windows自带的拷贝进度条到我们的 系统里面来 的 可能性?
能不能给个思路,最好还是代码段?
有没有集成windows自带的拷贝进度条到我们的 系统里面来 的 可能性?
解决方案 »
- WPF listview 显示图片
- 谁有VS2010的汉化补丁???急急急
- Team foundation server
- 使用webbrowser控件,使用documenttext,得到中文乱码,求救!
- 怎么样过滤掉DataSet里面重复的纪录
- 奇怪的问题,有关dbf的数据表创建
- treeview添加删除节点问题。
- picturebox控件能显示从手机传过来的视频流吗???大神们,求助啊!!!
- @@$$$$在Visual studio.net 2003中用C#语言怎样做一登录窗口(Winform)&&&&&
- 请问:连接数据库时如何加主机地址?
- 求索C#基本语法教程!
- HttpWebRequest页面请求时编码问题
public void SetNewsStatusBar(int rate)
{
Invoke(new DelegateSetStatusBar(InternalSetStatusBar), new object[]{rate});
}private void InternalSetStatusBar(int rate)
{
int value = rate;
value = Math.Max(value, progressBar.Minimum);
value = Math.Min(value, progressBar.Maximum);
progressBar.Value = value;
}
pBar1.Visible = true;
// Set Minimum to 1 to represent the first file being copied.
pBar1.Minimum = 1;
// Set Maximum to the total number of files to copy.
pBar1.Maximum = filenames.Length;
// Set the initial value of the ProgressBar.
pBar1.Value = 1;
// Set the Step property to a value of 1 to represent each file being copied.
pBar1.Step = 1;
// Loop through all files to copy.
for (int x = 1; x <= filenames.Length; x++)
{
// Copy the file and increment the ProgressBar if successful.
if(CopyFile(filenames[x-1]) == true)
{
// Perform the increment on the ProgressBar.
pBar1.PerformStep();
}
}
msdn中的,具体可以去看看