home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / DBT123S.ZIP / PRTTEST.PRG < prev    next >
Text File  |  1989-10-27  |  4KB  |  153 lines

  1. *==============================================================
  2. *  PRTTEST.PRG - demo of printer driver
  3. *                (c) 1989 BERNATH COMPUTER
  4. *                12:15:51  10/27/1989
  5. *==============================================================
  6. CALL DBTOOLS WITH "7,2,0,3,0"
  7.  
  8. EXITNOW = .F.
  9. OKPRINT = .F.
  10. mKEY = gPRT
  11. DO SELPRT WITH .F.,mKEY
  12.  
  13.  
  14. IF .NOT. EXITNOW
  15.    SET COLOR TO +W/B,+BG/N,,B
  16.    CLEAR
  17.    CALL DBTOOLS WITH "1,S,2,10,1,3,0,This is a test of the printer driver escape codes."
  18.    mPRNAME = SPACE(36)
  19.    mNUMCMDS = 0
  20.    mPRTYPE = 0
  21.    mTYPEDESC = SPACE(20)
  22.    DO GETPRINFO WITH mNUMCMDS,mPRTYPE,mPRNAME,mTYPEDESC
  23.    @ 6,10 SAY "Are you ready to continue (Y/N)?"
  24.    mYN = " "
  25.    @ 6,43 SAY mYN
  26.    DO YESNO WITH mYN
  27.    IF mYN = "Y"
  28.  
  29.    set printer on
  30.    set console off
  31.    CALL DBTOOLS WITH "11,1"
  32.    IF mPRTYPE = 3
  33.       CALL DBTOOLS WITH "11,18"
  34.       CALL DBTOOLS WITH "11,23"
  35.    ENDIF
  36.  
  37.    ?
  38.    ? "PRINTER TEST"
  39.    IF mPRTYPE = 3
  40.       CALL DBTOOLS WITH "11,2"
  41.    ENDIF
  42.    ? mPRNAME + "   " + mTYPEDESC
  43.    ?
  44.  
  45.    ? "This is normal print"
  46.    ? "This is normal print"
  47.    ? "This is normal print"
  48.    ?
  49.    call dbtools with "11,3"
  50.    ? "This is 12 CPI"
  51.    ? "This is 12 CPI"
  52.    ? "This is 12 CPI"
  53.    ?
  54.    call dbtools with "11,2"
  55.    call dbtools with "11,4"
  56.    ? "This is compressed print"
  57.    ? "This is compressed print"
  58.    ? "This is compressed print"
  59.    ?
  60.    call dbtools with "11,5"
  61.    call dbtools with "11,8"
  62.    ? "This should be BOLD"
  63.    ? "This should be BOLD"
  64.    ? "This should be BOLD"
  65.    ?
  66.    call dbtools with "11,9"
  67.    call dbtools with "11,10"
  68.    ? "Is this italic?"
  69.    ? "Is this italic?"
  70.    ? "Is this italic?"
  71.    ?
  72.    call dbtools with "11,11"
  73.    call dbtools with "11,12"
  74.    ? "Here's some underline"
  75.    ? "Here's some underline"
  76.    ? "Here's some underline"
  77.    ?
  78.    call dbtools with "11,13"
  79.    call dbtools with "11,6"
  80.    ? "DOUBLE WIDE"
  81.    ? "DOUBLE WIDE"
  82.    ? "DOUBLE WIDE"
  83.    ?
  84.    call dbtools with "11,7"
  85.    call dbtools with "11,18"
  86.    ? "Near letter quality"
  87.    ? "Near letter quality"
  88.    ? "Near letter quality"
  89.    ?
  90.    call dbtools with "11,19"
  91.    ? "Here we have "
  92.    call dbtools with "11,14"
  93.    ?? "superscript"
  94.    call dbtools with "11,15"
  95.    ?? " and here we have "
  96.    call dbtools with "11,16"
  97.    ?? "subscript."
  98.    call dbtools with "11,17"
  99.    ?
  100.    ? "6 lines per inch"
  101.    ? "6 lines per inch"
  102.    ? "6 lines per inch"
  103.    ?
  104.    call dbtools with "11,21"
  105.    ? "8 lines per inch"
  106.    ? "8 lines per inch"
  107.    ? "8 lines per inch"
  108.    ? "8 lines per inch"
  109.    ?
  110.    call dbtools with "11,22"
  111.    ? "4 lines per inch"
  112.    ? "4 lines per inch"
  113.    ? "4 lines per inch"
  114.    ?
  115.    call dbtools with "11,20"
  116.    ?  "Character graphics:     ┌─────┬─────┐   ╔═════╦═════╗"
  117.    ?  "    ░░▒▒▓▓██            │     │     │   ║     ║     ║"
  118.    ?  "    ░░▒▒▓▓██            └─────┴─────┘   ╚═════╩═════╝"
  119.    eject
  120.    IF mPRTYPE = 3
  121.       CALL DBTOOLS WITH "11,19"                 && switch to landscape
  122.       ?
  123.       ?
  124.       ? "LANDSCAPE ORIENTATION"
  125.       ?
  126.       CALL DBTOOLS WITH "11,2"
  127.       ? "This is 10 CPI"
  128.       ? "This is 10 CPI"
  129.       ?
  130.       CALL DBTOOLS WITH "11,8"
  131.       ? "This is Bold"
  132.       ? "This is Bold"
  133.       ?
  134.       CALL DBTOOLS WITH "11,4"
  135.       ? "This is compressed"
  136.       ? "This is compressed"
  137.       ?
  138.       CALL DBTOOLS WITH "11,5"
  139.       CALL DBTOOLS WITH "11,12"
  140.       ? "This is underline"
  141.       ? "This is underline"
  142.       ?
  143.       CALL DBTOOLS WITH "11,13"
  144.       CALL DBTOOLS WITH "11,18"                 && switch to portrait
  145.       CALL DBTOOLS WITH "11,1"
  146.    ENDIF
  147.    set printer off
  148.    set console on
  149.    ENDIF
  150. ENDIF
  151. EXITNOW = .F.
  152. RETURN
  153.