Consultor Eletrônico



Kbase 18872: How to Display the Hourglass While a Batch Process Runs
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/05/1999
SUMMARY:

It is often desirable to block user interaction when running a batch
or background process from an interactive one. The code below offers a model for accomplishing this.

SOLUTION:

/* waiting.p */

DEFINE BUTTON batch-job LABEL "Batch Process".
DEFINE BUTTON cancel-button LABEL "Cancel"
AUTO-ENDKEY SIZE 8 BY 1.
FORM
SKIP SPACE(3) "First Process" SKIP(3)
batch-job AT 3 cancel-button AT 25 SPACE(2) SKIP(1)
WITH FRAME main-frame CENTERED title "Initial Window".
FORM
" Configuring Your services file.... " SKIP(1)
cancel-button AT 40
WITH FRAME upd-frame TITLE " P L E A S E W A I T" .
FRAME upd-frame:HIDDEN = TRUE.
ON CHOOSE OF batch-job
DO:
DISPLAY WITH FRAME UPD-FRAME.
VIEW FRAME upd-frame.
ENABLE ALL WITH FRAME upd-frame.
HIDE cancel-button IN FRAME upd-frame.
HIDE FRAME main-frame.
STATUS INPUT "P L E A S E W A I T".
SESSION:set-wait-state("general").
PAUSE 6 no-message. /* run batch process */
SESSION:set-wait-state("").
PAUSE 0 NO-MESSAGE.
VIEW FRAME main-frame.
STATUS INPUT "Enter data or press ESC to end".
HIDE FRAME upd-frame.
APPLY "choose" TO cancel-button IN FRAME upd-frame.
END.
ENABLE ALL WITH FRAME main-frame.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.


References To Written Documentation:

Language Reference Volume 3, SESSION Handle
Progress Knowledge Base Solution 13687, "How to Pop Up a Status Message Box with Hourglass"