Progress
Results Administration
and Development Guide


Results Main Application Procedure

Most of the discussion in this chapter focuses on calling other Progress procedures from Results. But you can also integrate Results into an existing Progress application. The main procedure for the Results application is results.p, located in the Progress product directory (DLC). To run Results from another Progress procedure, use the following statement:

RUN results.p. 

If you run Results from a Progress application that has its own application window, use the technique outlined below to manage user focus and multiple windows:

/* Template Calling RESULTS from a Progress application */ 
/* 1 */ 
   DEFINE VARIABLE parentWin AS WIDGET-HANDLE NO-UNDO. 
/* 2 */ 
   ASSIGN 
    parentWin = CURRENT-WINDOW 
    parentWin:WINDOW-STATE = WINDOW-MINIMIZED 
    parentWin:SENSITIVE = FALSE. 
/* 3 */ 
   RUN results.p. 
   ASSIGN 
/* 4 */ 
   CURRENT-WINDOW = parentWin 
/* 5 */ 
    parentWin:WINDOW-STATE = WINDOW-NORMAL 
    parentWin:SENSITIVE = TRUE. 

The commented numbers refer to the notes:

  1. Create a variable to hold the widget handle of the parent application window.
  2. Place the widget handle of the parent application window into the new variable. The CURRENT–WINDOW session handle returns the widget handle of the parent application window.
  3. Minimize the parent application window and disable it for user input while the procedure displays the Results application window.
  4. Restore the CURRENT–WINDOW handle to the original window handle.
  5. Restore the parent application window and enable it for user input after the user closes the Results application window.

For more information about general programming concepts and techniques, see the Progress Programming Handbook. See the Progress Language Reference for information about language elements in the Progress 4GL.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095