473,394 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Progress bar update on large files

Is there an efficient way of copying a file and at the same time updating a
progress bar with short intervals to see how much is still to copy of the
file? Like some FTP programs have for instance.
Nov 10 '06 #1
4 2628
I have done someting like that, and the best way I found, whast to, use a
timer to check the state of the copy, the copy was in a thread, and work
very well, other way is, in the same thread signaling and event, about the
progres.

If you are in the framework 2.0 there is a class that handles much of this,
for coping files, from a remote machine, to the local one.

Regards,

Bela Istok
"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:FC**********************************@microsof t.com...
Is there an efficient way of copying a file and at the same time updating
a
progress bar with short intervals to see how much is still to copy of the
file? Like some FTP programs have for instance.

Nov 10 '06 #2
Thank you Bela,
If you are in the framework 2.0 there is a class that handles much of this,
for coping files, from a remote machine, to the local one.
Which class do you mean?

Regards,
Joachim

"Bela Istok" wrote:
I have done someting like that, and the best way I found, whast to, use a
timer to check the state of the copy, the copy was in a thread, and work
very well, other way is, in the same thread signaling and event, about the
progres.

If you are in the framework 2.0 there is a class that handles much of this,
for coping files, from a remote machine, to the local one.

Regards,

Bela Istok
"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:FC**********************************@microsof t.com...
Is there an efficient way of copying a file and at the same time updating
a
progress bar with short intervals to see how much is still to copy of the
file? Like some FTP programs have for instance.


Nov 10 '06 #3
System.Net.WebClient

"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:A0**********************************@microsof t.com...
Thank you Bela,
>If you are in the framework 2.0 there is a class that handles much of
this,
for coping files, from a remote machine, to the local one.

Which class do you mean?

Regards,
Joachim

"Bela Istok" wrote:
>I have done someting like that, and the best way I found, whast to, use a
timer to check the state of the copy, the copy was in a thread, and work
very well, other way is, in the same thread signaling and event, about
the
progres.

If you are in the framework 2.0 there is a class that handles much of
this,
for coping files, from a remote machine, to the local one.

Regards,

Bela Istok
"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:FC**********************************@microso ft.com...
Is there an efficient way of copying a file and at the same time
updating
a
progress bar with short intervals to see how much is still to copy of
the
file? Like some FTP programs have for instance.



Nov 10 '06 #4
You can also use a background worker component that's more efficient than a
timer since it does not tie up the main UI thread. You can set the progress
method and the actual method that does the work. The work method can then
update the progress percentage in the event args that gets passed in and the
progress method will get an asynchronous notification.

For more info, see http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx

--
Good luck!

Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
"Joachim" wrote:
Thank you Bela,
If you are in the framework 2.0 there is a class that handles much of this,
for coping files, from a remote machine, to the local one.

Which class do you mean?

Regards,
Joachim

"Bela Istok" wrote:
I have done someting like that, and the best way I found, whast to, use a
timer to check the state of the copy, the copy was in a thread, and work
very well, other way is, in the same thread signaling and event, about the
progres.

If you are in the framework 2.0 there is a class that handles much of this,
for coping files, from a remote machine, to the local one.

Regards,

Bela Istok
"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:FC**********************************@microsof t.com...
Is there an efficient way of copying a file and at the same time updating
a
progress bar with short intervals to see how much is still to copy of the
file? Like some FTP programs have for instance.
Nov 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul | last post by:
i have been working with vb6 for a while but never had the pleasure of using progress bars. That is until now, one of the programs i have written has just been modified so that large csv files of...
2
by: bob | last post by:
Hello, I want to show progress to the user while some method is running so I thought I'd use a progress bar. But I don't see how I can do this without writing GUI code in the model? In...
3
by: Brian Birtle | last post by:
**** A CHALLENGE TO THE GURUS - refute the statement "It's impossible to build a file upload progress meter using ASP.NET" **** First person to prove me wrong gets "All Time .NET Programming GOD"...
4
by: Kenneth Keeley | last post by:
Hi, I have a page that uploads files to my server and I wish to display a "Please wait while uploading" page to the user while the file is uploading. I have been able to redirect the user once the...
11
by: brother52 | last post by:
I am using My.Computer.FileSystem.CopyFile() to copy a bunch of files from one directoy to another, and would like to display a progress bar on the screen for each file being copied. Is this...
8
by: WhiteWizard | last post by:
I guess it's my turn to ASK a question ;) Briefly my problem: I am developing a Windows app that has several User Controls. On one of these controls, I am copying/processing some rather large...
2
by: Michael Jervis | last post by:
Hi, I'm writing a little application that scans a large number of media files for processing. The main application currently uses a backgroundworkerprocess to perform the scan. Each media...
3
by: half.italian | last post by:
I'm making a small interface for copying large groups of files around a filesystem. I have a progressbar that counts the items in the destination, and increments as each new file is copied over. ...
23
ADezii
by: ADezii | last post by:
Many Access Users fail to realize that it has a built-in Progress Meter that can display the relative completion percentage of various processes. It is fairly limited, but nonetheless, does provide...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.