Article number: KB000001
Related blocks:
There are two methods of indication of long-run processes on creating custom forms in Fore:
Use the static property WaitCursor of the class Ui.WinApplication. When this property is set to True, the mouse pointer looks like hourglass (
), when this property is set to False, the pointer changes to its original look.
Example of code:
Sub OperationX;
Begin
WinApplication.WaitCursor := True;
Try
// Long-term operation
Finally
WinApplication.WaitCursor := False;
End Try;
End Sub OperationX;
Use methods BeginOperation and EndOperation of the form object. When the BeginOperation method is called the form displays a standard progress bar at the bottom of the form with the text set by the developer. For example: 
After finishing an operation you need to call the EndOperation method to return the form to initial state.
Example of code:
Sub OperationY;
Begin
BeginOperation(NotificationEdit.Text);
Try
// Long-term operation
Finally
EndOperation;
End Try;
End Sub OperationY;
These methods are to be used in the operator Try … Except … Finally … End Try to correctly finish a long-term process if an exception occurs.
See also: