Solved

progress bar in VFP9

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
A Short Story about the Best File Recovery Software – Acronis True Image 2017
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now