Solved

progress bar in VFP9

Posted on 2011-03-17
3
929 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 500 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

Technology Partners: 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

Suggested Solutions

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…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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