Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

progress bar in VFP9

Posted on 2011-03-17
3
Medium Priority
?
1,034 Views
Last Modified: 2012-05-11
Hi Experts
I am copying a large file to an other device during backup and using _thermometer as progress bar.
My progress bar is stuck at one place wihle it is copying this large file.
I would like to see my progress bar moving according to how much data been transfered !

Please help
Thanks
0
Comment
Question by:b001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 35161041
You can to copy the file using low level function.
FOPEN, FREAD, FWRITE, FCLOSE and track the number of bytes being written.
0
 

Author Comment

by:b001
ID: 35183934
Hi CaptainCyril
please write the code for me.
Thanks
0
 
LVL 27

Accepted Solution

by:
CaptainCyril earned 2000 total points
ID: 35184110
I did not test this but it will give you a headstart


hFile = FOPEN(cFileName, 0) && get handle to file
hFileDestination = FCREATE(cFileName1, 0) && get handle to destination file
nFileSize = FSEEK(hFile,0,2) && go to end of file
= FSEEK(hFile,0,0) && go to beginning of file
nWritten = 0
DO WHILE NOT FEOF(hFile)
      cLine = FREAD(hFile,1024)
        = FWRITE(hFileDestination,cLine)
        nWritten = nWritten+1024
       WAIT WINDOW STR(MIN(nWritten/nFileSize,1)*100,6,2)+'%' NOWAIT
ENDDO
= FCLOSE(hFile)
= FCLOSE(hFileDestination)
WAIT CLEAR
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question