Page 1 of 1

DCPROGRESS

Posted: Sat Mar 07, 2015 9:19 am
by obelix
Hi Riger,

DCPROGRESS is a powerful function to untertain the user while proceeding a time-consuming process.
I would like to use it while proceeding a function like this:

Code: Select all

@ 4,5 DCPROGRESS oProgress ;
       SIZE 60,1.5 ;
       MAXCOUNT RecCount();
       COLOR GRA_CLR_BLUE ;
       PERCENT ;
       EVERY Int(RecCount()/100)

DCREAD GUI TITLE 'My Test Dialog' ;
   PARENT @oDialog ;
   FIT ;
   EXIT
oDialog:show()

example() WHILE _Progress( oProgress )

function example
....

I need it i.e for reading from a file with fread or while indexing a dbf. Is there any chance to realize it ?
I'm only working with modal windows.

Re: DCPROGRESS

Posted: Sat Mar 07, 2015 9:31 am
by Wolfgang Ciriack
Hi,

Code: Select all

DCREAD GUI TITLE 'My Test Dialog' ;
   PARENT @oDialog ;
   FIT ;
   EXIT ;
   NODESTROY

nTotal:=reccount()
counter:=0
dbgotop()
Do while ...
    DC_Getprogress(oProgress, ++counter, nTotal)
    ...
enddo
oDialog:destroy()

Re: DCPROGRESS

Posted: Sun Mar 08, 2015 10:36 am
by Eugene Lutsenko
I use two ways to display the execution stage. The first method is easy - simply based on a certain number of operations. The second way - the more developed that predicts the expected execution time. In the second method takes into account the average duration of the execution of all operations performance. Also in the second method displays not only the progress bar, the stage ispoleniya as text.

http://lc.kubagro.ru/Dima/a.doc

Re: DCPROGRESS

Posted: Tue Mar 10, 2015 1:28 pm
by obelix
Thank you Wolfgang for your advice, it's working good.