Posts: 1,956
Threads: 65
Joined: Jun 2003
Remexx,
I would ignore all this garbage about PowerBasic.
Unless the progress-bar is an absolute necessity for your program, I would forget about it. Otherwise, you will spend 80% of your programming and debuging time just on this one feature of your program.
Another alternative is to display a message like this:
... Installation is xx% complete ...
and keep updating the xx percentage as your program progresses. Many Microsoft utilities do this.
*****
Posts: 108
Threads: 0
Joined: Jan 2006
Quote:Another alternative is to display a message like this:
... Installation is xx% complete ...
and keep updating the xx percentage as your program progresses.*****
Is that really so different from a progress bar?
If you have calculated that percentage, displaying a progress bar is an after thought. Determining that percentage is the bulk of the work.
Posts: 3,368
Threads: 195
Joined: Jan 2003
You need to set up graphics routines...
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 684
Threads: 64
Joined: May 2004
Is there not a way to find the size of a file?
quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Posts: 1,439
Threads: 15
Joined: Apr 2003
You can get the size of an open file with
LOF. The best way to do this is probably to open the source and destination files yourself and copy blocks from one to the other, displaying a progress bar with (bytes copied / total bytes).
Posts: 1,956
Threads: 65
Joined: Jun 2003
Quote:You can get the size of an open file with LOF. The best way to do this is probably to open the source and destination files yourself and copy blocks from one to the other, displaying a progress bar with (bytes copied / total bytes).
Using a LOF to get the exact size of each file is an elegant solution which then enables you to make the percentage of completeness more precise. Add up all the file sizes to a total. As you finish the copy for a particular file, add that file's size divided by the total to the percentage complete and display it.
This file-by-file cumulative progress is good enough in my opinion. You just want to give the user a feeling of the progress.
I would stay away from copying the files internally via the program. This approach has many pitfalls, so unless you're an expert on copying files, I would stick to the original suggestion of using a SHELL to a COPY command for each file.
*****
Posts: 26
Threads: 2
Joined: Nov 2005