PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → How to show progress during tight loops (ZIP, complex SQL query...)
How to show progress during tight loops (ZIP, complex SQL query...)
Iniciado por vvido, 13,feb. 2015 15:40 - 2 respuestas
Miembro registrado
94 mensajes
Publicado el 13,febrero 2015 - 15:40
WD18

I am using ZipAddDirectiry to make a backup of several nested directories. It takes quite a lot of time to finish.
I wanted to show the user some kind (any kind) of progress .

During the call to zip the window does not get the focus, there are also no callbacks which would allow me to animate a progress bar. I do change the cursor, but this is not enough.

I have tried to open another MDI window with an animated GIF, which would run in paralel with the window which executes the zip action. But unfortunately in all my test cases, the animated gif stopped until the zip process was finished.

ZipAddDirectory is very handy, I would not like to break it down to zipping individual files and directories.

The same problem applies when a SQ server does not respond for a longer time (in case of complex queries)
Any ideas ?
Miembro registrado
94 mensajes
Publicado el 13,febrero 2015 - 15:57
There is a callback procedure for ZipAddDirectory, but the question is stil valid for
- complex SQL queries (several seconds before returning the recordset) or
- long computation loops
Publicado el 13,febrero 2015 - 16:32
Hi

you can do that using multithreading

Not sure if the result is worth the added complexity, though

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com

On 2/13/2015 9:57 AM, vvido wrote:
There is a callback procedure for ZipAddDirectory, but the question is
stil valid for - complex SQL queries (several seconds before returning
the recordset) or
- long computation loops