home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / paolin.zip / GENERIC / GENERIC4.SC < prev    next >
Text File  |  1993-05-18  |  1KB  |  38 lines

  1. ; ****************************************************************************
  2. ;       TITLE: GENERIC4.sc
  3. ;     SESSION: KELTON/PAOLINI - Generic Utility Procedures in Paradox 4
  4. ;   COPYRIGHT: (c) 1993 - David Kelton/Dan Paolini - DataStar International
  5. ; DESCRIPTION: Example of generic Message routine with optional pause
  6. ; ****************************************************************************
  7. PROC MsgPause.u(message.a,pause.l)
  8.    Message message.a
  9.    IF pause.l THEN
  10.       WHILE true
  11.          GetEvent ALL To y
  12.          IF (y["Type"] = "MOUSE" AND y["Action"] = "DOWN") OR
  13.             y["Type"] = "KEY" THEN
  14.             QUITLOOP
  15.          ENDIF
  16.          Beep Sleep 50 Beep Sleep 500
  17.       ENDWHILE
  18.    ELSE
  19.       Beep Sleep 50 Beep Sleep 3000
  20.    ENDIF
  21.    Return
  22. ENDPROC
  23.  
  24.    Create "Answer" "Test" : "S"
  25.    ;quExecute.l() ; perform query
  26.    retval = true  ; query executed ok
  27.    IF retval THEN
  28.       IF IsEmpty("Answer") THEN
  29.          MsgPause.u("There were no records that matched your selection " +
  30.                     "criteria.  Click the mouse or press any key to return " +
  31.                     "to the menu.",true)
  32.       ELSE
  33.          ; ...
  34.       ENDIF
  35.    ENDIF
  36.    MsgPause.u("This Message will go away by itself",false)
  37.  
  38.