paintIfRequired() clientExecution;
The paintIfRequired method of the Application class causes all forms of the application to be repainted if a repaint is required; for example, while performing a long processing loop, to ensure that the user presentation is updated after the user brings another application to the front and then returns to JADE.
The JADE executable calls the DisableProcessWindowsGhosting() Microsoft API on initiation, which disables Windows’ ghosting so that a non-responsive form does not show Not Responding, nor does it have the ghosting effect applied by Windows. However, the form will still not automatically paint itself when the presentation thread is busy processing JADE logic. Windows automatically redraws that part of the form or forms that need refreshing from a saved copy of the previously painted image or images.
A
The paintIfRequired method performs any repainting required without having to perform an
Other than any paint events, no other events, notifications, or timer events will be processed as a result of this paintIfRequired method call.
After a repaint, any clicked button that initiated the processing loop will be drawn in the up position, so it will be important that the user is given a visual indication that the processing is still progressing by some other means; for example, by using the app.mousePointer := 11 (busy) property value.
You will need to add a call to your logic loop that is regularly performed; for example, call it when the Cancel button is checked for a
cancelled := false; while not cancelled do // ... logic // the click event sets the cancelled property btnCancel.doWindowEvents(0); app.paintIfRequired(); endwhile;