Normally, you would use a progress bar to show some progression between a start and finish state. Sometimes, however, you may perform some action and you may not know exactly when it is going to end. Instead, to show that something is going on, you may want to display a "busy" or "waiting" progress bar. This progress bar loops between 0 and 100% continuously until some action is completed.
You will need a table and a form. In this example, the table is named "Shell" and the form is named "Form1."
Create a form with a thermometer or a Dial and name it "vBusyMeter." Then use this form method:
: (Form event=On Load )
` initialize the busy meter to 0
` set the timer to execute each 15th of a second
: (Form event=On Timer )
` if the busy meter's value is less than 100, add to it, otherwise reset it
: (Form event=On Outside Call )
` just cancel it if it is called from outside
Next create a method to open that form. Call it "ShowWaiting" :
` this method just opens a dialog box
$winRef:=Open form window([Shell];"Form1")
To open the form, launch a new process using the above method:
` loop until some unknown time
The above example will loop until some unspecified time, at which point, the process is called from the outside which will close the progress bar. Be careful when using this technique as On Timer can hog CPU time.
Find more information about progress bars in the techical note Progress Indicator