home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- FUNCTION PRNCHECK (msg_line)
- *****************************************************************
-
- * Displays a message if printer is not ready
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- # include "inkey.ch"
-
- LOCAL old_screen := '', keypress := 0
-
- * Initialize message line if not passed
- msg_line := IF(msg_line = NIL, MAXROW(), msg_line)
-
- IF .NOT. ISPRINTER()
- * Wait 1 second just in case print buffer is full.
- * For slower printers, increase time delay.
- PAUSE(1)
- ENDIF
-
- * Try again. If printer still is not ready, display a message.
- * Wait for operator to press Esc or make printer ready
-
- IF .NOT. ISPRINTER()
-
- * Save message line screen
- old_screen = SCRNSAVE(msg_line, 0, msg_line, MAXCOL())
-
- * Sound bell and display a message
- ?? CHR(7)
- CENTERON(msg_line, 'Your printer is not ready! ' + ;
- 'Correct or press Esc to abort.')
-
- * Wait for printer to be ready, or Esc key to be pressed
- DO WHILE .NOT. ISPRINTER() .AND. keypress != K_ESC
- keypress = INKEY()
- ENDDO
-
- * Restore message line screen
- SCRNREST(old_screen)
-
- ENDIF
- RETURN( IF(keypress = K_ESC, .F.,.T.) )
-
-