WAIT WINDOW does not show text

Hi Experts
I am using the following code to copy large file and while copying wait window shows the progress.

Procedure large_file
Lparameters fileoldx,filenewx, FILENAMEX

hFile = Fopen('&fileoldx', 0) && get handle to file
hFileDestination = Fcreate('&filenewx', 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,2048)
      = Fwrite(hFileDestination,cLine)
      nWritten = nWritten+2048
      Store 'Copying. '+FILENAMEX+' '+Str(Min(nWritten/nFileSize,1)*100,6,2)+'%' To waitcap
      Wait Window waitcap At 35,40 Nowait
Enddo
= Fclose(hFile)
= Fclose(hFileDestination)


Wait Clear
Endproc

I works fine on all windows OS.
I have new machine with window8.
It does the copying but wait window shows blank , only when the copy completed then it say 100%.

Please help.
Thanks
b001Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pcelbaCommented:
Windows 8 is optimizing the screen output different way than earlier versions... and when the program is busy it does not redraw the screen or all windows.

OTOH it is not necessary to show the progress when the file is shorter than let say 1 MB.

But OK, if you need to redraw the screen then place
= INKEY(0.1)
command after the WAIT WINDOW and it should help. You may also use longer waiting interval but it will slow down your copy procedure.

You could also increase the 2048 bytes chunks used for file fragmentation. 64KB is OK today.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
Try this:

WAIT WINDOW 'Copying. '+FILENAMEX+' '+Str(Min(nWritten/nFileSize,1)*100,6,2)+'%' NOWAIT
0
pcelbaCommented:
Captain,

do you think the  AT clause  causes blank wait window on Windows 8 ?
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

b001Author Commented:
I have tried without AT, no difference.
0
pcelbaCommented:
OK, I supposed that.

What about  the  =INKEY(0.1)   command?
0
b001Author Commented:
HI pcelba

= INKEY(0.1)
yes this works.
how can I redraw screen avery 5 seconds so it does not slow down?
Thanks
0
pcelbaCommented:
You'll need to record the current time:
LOCAL lnStartTime
lnStartTime = SECONDS()
Do While Not Feof(hFile)

      cLine = Fread(hFile,2048)
      = Fwrite(hFileDestination,cLine)
      nWritten = nWritten+2048
      Store 'Copying. '+FILENAMEX+' '+Str(Min(nWritten/nFileSize,1)*100,6,2)+'%' To waitcap
      Wait Window waitcap At 35,40 Nowait
      IF SECONDS() - m.lnStartTime > 5
         = INKEY(0.1)
         lnStartTime = SECONDS()
      ENDIF
Enddo

Open in new window

0
CaptainCyrilFounder, Software Engineer, Data ScientistCommented:
Not really, pcelba, but I thought maybe somehow it is shooting for Foxels outside the range of the screen instead of pixels if for some reason the screen font changed. I never worked under Windows 8 so I don't know what type of bugs/issues it has :).
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FoxPro

From novice to tech pro — start learning today.