Solved

progress bar in VFP9

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

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…
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

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