this is the basic code of when you want to show progress. it will show the progress animation while the system is waiting to go through your code.
public void sysOperationProgressSample()
{
    SysOperationProgress        progress = new SysOperationProgress();
     counter                     counter = 0;
    counter                     progressCounter = 0;
    LineNum                     lineNum = 0;
    int                         lineTotal;
    ;
#AviFiles
 
    progress.setCaption("Processing Records...");
    progress.setAnimation(#AviUpdate);
    lineTotal = 9999; //set total of lines here
    progress.setTotal(lineTotal);
    while select ...
     {
        //put these lines on top (or at the bottom of what you are doing)
        counter++;
        progressCounter++;
        progress.setText(strFmt("Processing %1 of %2 records. Please wait",int2str(counter),int2str(lineTotal)));
         progress.incCount();
        /*
        your stuff here
        */
    }
}
 
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment