Category : Files from Magazines
Archive   : V12N12.ZIP
Filename : PRTSCR.PRG

 
Output of file : PRTSCR.PRG contained in archive : V12N12.ZIP
*********************************************************************
* Demonstrate the PRNTSCR() function
*********************************************************************
CLEAR
OldColor = SETCOLOR("W+/R")
nR = MAXROW()
nC = MAXCOL()
cText = "PC Magazine "
cPcmag = REPLICATE(cText, (nC / LEN(cText)) + 1 )
@ 0, 0 TO nR, nC
FOR i = 1 to (nR - 1)
@ i,1 SAY LEFT(cPcmag, nC - 1)
NEXT
Prntscr("Sample Header","Sample Footer", .T.)
RETURN

*********************************************************************
* FUNCTION Prntscr - Send current screen to printer
* Optional parameters: cHeader, cFooter, lFormfeed
*********************************************************************
FUNCTION Prntscr
PARAMETERS cHeader, cFooter, lFormfeed
LOCAL nRows, nCols, nLine, nPos, nRow, nCol, cChar
LOCAL nMsgrow, nMsgcol
nRows = MAXROW()
nCols = MAXCOL()
nLine = 2 * (nCols + 1)
STORE 0 TO nRow, nCol, nPos
cChar = " "
SAVE SCREEN TO cScreen
nMsgcol = INT((nCols - 40) / 2)
nMsgrow = INT((nRows - 4) / 2)
@ nMsgrow, nMsgcol CLEAR TO nMsgrow + 4, nMsgcol + 40
@ nMsgrow + 1, nMsgcol + 1 TO nMsgrow + 3, nMsgcol + 39 DOUBLE
@ nMsgrow + 2, nMsgcol + 12 SAY "Printing screen . . . "
SET PRINT ON
SET CONSOLE OFF
IF cHeader != NIL
?
?
?
? cHeader
?
?
?
ENDIF
FOR nRow = 0 TO nRows+1
FOR nCol = 0 TO nCols
nPos = 1 + (nCol * 2) + (nRow * nLine)
cChar = SUBSTR(cScreen, nPos, 1)
?? cChar
NEXT
?
NEXT
IF cFooter != NIL
?
?
? cFooter
ENDIF
IF lFormfeed != NIL
EJECT
ENDIF
SET PRINT OFF
SET CONSOLE ON
RESTORE SCREEN FROM cScreen
RETURN .T.

* Dale Shaw
* 100033,2241
* 26 Maioro Street
* Avondale
* Auckland
* NEW ZEALAND
*********************************************************************
* PRTSCR.PRG - Demonstrate the PRNTSCR() function
*********************************************************************
CLEAR
OldColor = SETCOLOR("W+/R")
nR = MAXROW()
nC = MAXCOL()
cText = "PC Magazine "
cPcmag = REPLICATE(cText, (nC / LEN(cText)) + 1 )
@ 0, 0 TO nR, nC
FOR i = 1 to (nR - 1)
@ i,1 SAY LEFT(cPcmag, nC - 1)
NEXT
Prntscr("Sample Header","Sample Footer", .T.)
RETURN

*********************************************************************
* FUNCTION Prntscr - Send current screen to printer
* Optional parameters: cHeader, cFooter, lFormfeed
*********************************************************************
FUNCTION Prntscr
PARAMETERS cHeader, cFooter, lFormfeed
LOCAL nRows, nCols, nLine, nPos, nRow, nCol, cChar
LOCAL nMsgrow, nMsgcol
nRows = MAXROW()
nCols = MAXCOL()
nLine = 2 * (nCols + 1)
STORE 0 TO nRow, nCol, nPos
cChar = " "
SAVE SCREEN TO cScreen
nMsgcol = INT((nCols - 40) / 2)
nMsgrow = INT((nRows - 4) / 2)
@ nMsgrow, nMsgcol CLEAR TO nMsgrow + 4, nMsgcol + 40
@ nMsgrow + 1, nMsgcol + 1 TO nMsgrow + 3, nMsgcol + 39 DOUBLE
@ nMsgrow + 2, nMsgcol + 12 SAY "Printing screen . . . "
SET PRINT ON
SET CONSOLE OFF
IF cHeader != NIL
?
?
?
? cHeader
?
?
?
ENDIF
FOR nRow = 0 TO nRows + 1
FOR nCol = 0 TO nCols
nPos = 1 + (nCol * 2) + (nRow * nLine)
cChar = SUBSTR(cScreen, nPos, 1)
?? cChar
NEXT
?
NEXT
IF cFooter != NIL
?
?
? cFooter
ENDIF
IF lFormfeed != NIL
EJECT
ENDIF
SET PRINT OFF
SET CONSOLE ON
RESTORE SCREEN FROM cScreen
RETURN .T.


  3 Responses to “Category : Files from Magazines
Archive   : V12N12.ZIP
Filename : PRTSCR.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/