home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / pbwindow.zip / PWDEMO.BAS < prev    next >
BASIC Source File  |  1990-09-10  |  44KB  |  1,522 lines

  1.  $COMPILE EXE
  2. $DYNAMIC
  3.  $ERROR ALL OFF
  4.  $LIB ALL OFF
  5. $OPTION CNTLBREAK OFF
  6. $STACK 5000
  7. $IF 0
  8.  PowerBASIC Windows Demo
  9.  PBWindows
  10.  Copr. 1990 Barry Erick
  11. $ENDIF
  12.  
  13. PowerBasicWindows:    'a label for an external debugger
  14.  version$ ="Version 2.10"
  15.  copyright$="Copyright 1990 Barry Erick"
  16.  Member$ = " Member ASP "
  17.  copyright1$="Certain portions Copyright  1990 Robert S. Zale"
  18.  
  19. $IF 0
  20.   To Compile, use PBC as:
  21.    PBC PWdemo -CE
  22.  
  23.   If you do not declare Max.Window% BEFORE you Include
  24.   PBWindow to any value >5, it will default to 5 in the file.
  25.   In this demo 14 are used, as we show 12
  26.   windows and 2 are used in the menuing at that time.
  27.  
  28.   Special instructions for using PBWindows.PBU :
  29.   Place PbWindow.Pbu in your PBUD directory or default directory
  30.   Place PbWindow.Inc in your INC directory or default directory
  31.   Place, in your program, the next six non-rem lines, or, at least the
  32.    Max.Window% and AutoBuildTime% assignments and the $INCLUDE statement.
  33.   PBWindows may have all library functions off and compiler errors off.
  34.   It may be benificial to turn Interpreted Print ON.
  35.   Demo version... The full version also comes with an additional program
  36.   that allows partial windows to save memory. If you don't scroll, zoom
  37.   or use menus, smaller models can be used. This can be done in any
  38.   combination of the above. The demo only adds constants necessary, and
  39.   is fully functionable and not crippled in any way.
  40. $ENDIF
  41.  
  42.  
  43.  DEFINT a - z'Best to do.
  44.  PUBLIC AutoFudge%'for this main unit.. make it global
  45.  PUBLIC KeyHit$
  46.  
  47. ' The next few assignments are necessary, except as noted
  48.  %PBWSmall = 0  'necessary constant
  49.  %PBWScr = 1    'only necessary if %PBWSmall is True, here for
  50.  %PBWMen = 1    ' compatibility with the smaller registered version
  51.  %PBWZo  = 1
  52.  %False = 0     'in unit and include, so not necessary here
  53.  %True  = NOT %False  'ditto
  54.  Max.Window% = 14 'defaults to a 5 if not included here
  55.  AutoBuildTime% = 30  'necessary
  56.  
  57.  AutoFudge% = 15      'not necessary for pbw, but needed for the demo
  58.  p = INSTR(COMMAND$,"/")
  59.  IF p > 0  THEN
  60.     p = VAL(MID$(COMMAND$,p+1))'allows a command line switch (/amount)
  61.     IF P > 10 AND P < 15000 THEN
  62.        AutoBuildTime% = P' to control the AutoBuildTime
  63.        AutoFudge% = P
  64.     END IF
  65.  END IF
  66.  ModifiedAutoBuildTime% = AutoBuildTime%
  67.  ModifiedAutoFudge% = AutoFudge%
  68.  
  69. 'Load the include that also links the unit
  70.  
  71. $INCLUDE "PBWindow.inc" 'always necessary
  72.  $LINK "DayDate.Pbu"    'for the demo only
  73.  $LINK "Cpu.OBJ"    'also for the demo only
  74.  DECLARE FUNCTION WhatCpu%()
  75.  
  76. $IF 0
  77.   Following publics are for the DAYDATE.PBU file.
  78.   DayDate.PBU is not needed for pbWindows, but is here to support the
  79.   demo.   CALL DATE
  80.   When DATE is called, the current DOS date is used to return the
  81.   current Day$, Month$,Year$, and Weekday$
  82. $ENDIF
  83.  
  84.  PUBLIC Day$,Month$,Year$,Weekday$
  85.  
  86. ' The following variable defaults to %False, but is best to include here
  87.  UnderDevelopment% = %False
  88.  
  89.  %black = 0'\
  90.  %blue  = 1'  \
  91.  %green = 2'   \
  92.  %cyan  = 3'    \
  93.  %red   = 4'     \
  94.  %magenta = 5'      \
  95.  %brown = 6'       \
  96.  %white = 7'        \______ Define Colors
  97.  %gray  = 8'        /
  98.  %ltblue = 9'       /
  99.  %ltgreen = 10'      /
  100.  %ltcyan = 11'     /
  101.  %ltred = 12'    /
  102.  %ltmagenta = 13'   /
  103.  %yellow = 14'  /
  104.  %brightwhite = 15' /
  105.  %blink = 16'/
  106.  
  107.  %AutoTime = 3' For the autorun demo
  108. ' Now save the users screen parameters for later use
  109.  IF CSRLIN >1 THEN
  110.     userattributes% = SCREEN(CSRLIN-1,1,1)
  111.  ELSE
  112.     userattributes% = SCREEN(1,1,1)
  113.  END IF
  114. $SEGMENT
  115. '[******************]
  116.  
  117. SUB Minorpause(numtokill%,Char$)
  118. LOCAL a$,x%, a!, b!
  119.  A! = TIMER
  120.  DO
  121.      B! = TIMER
  122.      IF INSTAT THEN
  123.         a$=INKEY$
  124.         KeyHit$ = A$
  125.         IF Char$ = CHR$(255) THEN EXIT LOOP
  126.         IF a$ = Char$ THEN EXIT LOOP
  127.      END IF
  128.  LOOP UNTIL b! => A! + %AutoTime +AutoFudge%
  129.  FOR x% = 1 TO numtokill%'12
  130.      CALL Removebox
  131.  NEXT
  132. END SUB
  133.  
  134. '[******************]
  135.  
  136.  
  137. SUB Pause(numtokill%)
  138. SHARED wpt%
  139. LOCAL a$,x%, a!, b!
  140.  CALL MakeBox(22,51,3,28,%black,%white,2,0,0,-1,-1)
  141.  CALL Ctrallbox(1,2,"Press spacebar to continue")
  142.  DO
  143.      a$=INKEY$
  144.  LOOP UNTIL a$=""
  145.  a! = TIMER
  146.  DO
  147.      B! = TIMER
  148.      IF INSTAT  THEN
  149.         a$=INKEY$
  150.         IF a$=" " THEN EXIT LOOP
  151.      END IF
  152.  LOOP UNTIL B! => A! + %AutoTime + AutoFudge%
  153.  FOR x% = 1 TO numtokill%+1'plus one , because this is a window
  154.      CALL Removebox
  155.  NEXT
  156. END SUB
  157.  
  158. '[******************]
  159.  
  160.  
  161. SUB Screen1(finished%)'main title
  162. SHARED wpt%,About
  163. LOCAL x%,y%
  164.  CALL MakeBox(4,17,6,47,%black,%white,1,0,0,-1,-1)
  165.  CALL BoxTitle(6,"Ver 2.10",-1,-1)
  166.  IF finished% THEN
  167.     CALL Ctrbox(1,"Thanks for Viewing")
  168.  END IF
  169.  CALL Ctrbox(2,"Windows  for")
  170.  CALL Ctrbox(3,"PowerBASIC")
  171.  IF finished% THEN
  172.     CALL CtrBox(4,"-Power and Speed-")
  173.  END IF
  174.  CALL MakeBox(13,15,4,55,%white,%black,0,0,0,-1,-1)
  175.  CALL Ctrbox(1,"Copyright 1990 Barry Erick")
  176.  CALL Ctrbox(2,"PowerBASIC Copyright 1990 Robert S. Zale")
  177.  IF Finished% AND IsColr% THEN
  178.     DECR wpt%
  179.     FOR y% = 7 TO 0 STEP -1
  180.         FOR x% = 0 TO 15
  181.             CALL Recolor(x%,y%,-1,-1)
  182. ' it happens so fast that we have to delay
  183.             DELAY .05
  184.         NEXT
  185.     NEXT
  186.     INCR wpt%
  187.  ELSEIF About THEN
  188.     CALL Pause(1)
  189.  ELSE
  190.     DELAY 3
  191.  END IF
  192.  FOR x% = 1 TO 2
  193.      CALL Removebox
  194.  NEXT
  195. END SUB
  196.  
  197. '[******************]
  198.  
  199. SUB Screen2'scroll
  200. LOCAL x%,cf,cb,cbf,cbb
  201.  IF NOT IsColr% THEN
  202.     cf = %White
  203.     cbb = %white
  204.  ELSE
  205.     cf = %Green
  206.     cbb = %red
  207.  END IF
  208.  CALL MakeBox(11,25,5,34,cf,%black,0,0,0,-1,-1)
  209.  CALL CtrBox(1,"PowerBASIC - The Fast Compiler")
  210.  CALL Ctrbox(2," ")
  211.  CALL Ctrbox(3,"Windows")
  212.  CALL Pause(1)
  213.  CALL MakeBox(4,17,9,46,cf,%black,3,0,0,cbb,%black)
  214.  CALL Prtbox(1,2,"▒   ▒  ▒▒▒  ▒   ▒ ▒▒▒▒   ▒▒▒  ▒   ▒  ▒▒▒▒ ")
  215.  CALL Prtbox(2,2,"▒   ▒   ▒   ▒▒  ▒  ▒  ▒ ▒▒ ▒▒ ▒   ▒ ▒   ▒ ")
  216.  CALL Prtbox(3,2,"▒   ▒   ▒   ▒ ▒ ▒  ▒  ▒ ▒   ▒ ▒   ▒ ▒▒    ")
  217.  CALL Prtbox(4,2,"▒ ▒ ▒   ▒   ▒ ▒ ▒  ▒  ▒ ▒   ▒ ▒ ▒ ▒  ▒▒▒  ")
  218.  CALL Prtbox(5,2,"▒ ▒ ▒   ▒   ▒ ▒ ▒  ▒  ▒ ▒   ▒ ▒ ▒ ▒    ▒▒")
  219.  CALL Prtbox(6,2,"▒▒ ▒▒   ▒   ▒  ▒▒  ▒  ▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒   ▒")
  220.  CALL Prtbox(7,2,"▒▒ ▒▒  ▒▒▒  ▒   ▒ ▒▒▒▒   ▒▒▒  ▒▒ ▒▒ ▒▒▒▒ ")
  221.  DELAY 1.25
  222.  FOR x% = 1 TO 5
  223.      CALL Boxscroll(0,-1,-1)
  224.      DELAY .03
  225.  NEXT
  226.  CALL Ctrbox(7,"Scrolling")
  227.  CALL Boxscroll(0,-1,-1)
  228.  DELAY .051
  229.  CALL Ctrbox(7,"Windows")
  230.  CALL Boxscroll(0,-1,-1)
  231.  DELAY .051
  232.  CALL Ctrbox(7,"Using")
  233.  CALL Boxscroll(0,-1,-1)
  234.  DELAY .051
  235.  CALL Ctrbox(7," PowerBASIC")
  236.  CALL Boxscroll(0,-1,-1)
  237.  DELAY .051
  238.  CALL BoxScroll(0,-1,-1)
  239.  DELAY 1.21
  240.  CALL Boxscroll(1,-1,-1)
  241.  CALL Prtbox(1,2,"██ ██  ███  █   █ ████   ███  ██ ██ ████ ")
  242.  DELAY .051
  243.  CALL Boxscroll(1,-1,-1)
  244.  CALL Prtbox(1,2,"██ ██   █   █  ██  █  █ ██ ██ ██ ██ █   █")
  245.  DELAY .051
  246.  CALL Boxscroll(1,-1,-1)
  247.  CALL Prtbox(1,2,"█ █ █   █   █ █ █  █  █ █   █ █ █ █    ██")
  248.  DELAY .051
  249.  CALL Boxscroll(1,-1,-1)
  250.  CALL Prtbox(1,2,"█ █ █   █   █ █ █  █  █ █   █ █ █ █  ███")
  251.  DELAY .051
  252.  CALL Boxscroll(1,-1,-1)
  253.  CALL Prtbox(1,2,"█   █   █   █ █ █  █  █ █   █ █   █ ██")
  254.  DELAY .051
  255.  CALL Boxscroll(1,-1,-1)
  256.  CALL Prtbox(1,2,"█   █   █   ██  █  █  █ ██ ██ █   █ █   █")
  257.  DELAY .051
  258.  CALL Boxscroll(1,-1,-1)
  259.  CALL Prtbox(1,2,"█   █  ███  █   █ ████   ███  █   █  ████ ")
  260.  DELAY .5
  261.  CALL Pause(1)
  262. END SUB
  263.  
  264. '[******************]
  265.  
  266. SUB Screen3'windows
  267. SHARED num$(),Zoom
  268. LOCAL apart%,x%
  269.  apart% = 5
  270.  FOR x% = 1 TO 12
  271.      IF x% >6 THEN rw% = 15 ELSE rw% = 5
  272.      IF x% = 7 THEN
  273.         apart% = 5
  274.         IF Zoom THEN
  275.            IF IsColr% THEN
  276.               CALL ZoomBox(rw%,apart%,6,10,x% MOD 8,2,0,0,x% MOD 2,-1,-1)
  277.            ELSE
  278.               CALL ZoomBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,7,0)
  279.            END IF
  280.  
  281.         ELSE
  282.            IF IsColr% THEN
  283.               CALL MakeBox(rw%,apart%,6,10,x% MOD 8,2,0,0,x% MOD 2,-1,-1)
  284.            ELSE
  285.               CALL MakeBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,7,0)
  286.            END IF
  287.         END IF
  288.      ELSE
  289.         IF Zoom THEN
  290.            IF IsColr% THEN
  291.               CALL ZoomBox(rw%,apart%,6,10,x% MOD 8,7-(x% MOD 8),_
  292.                    0,0,x% MOD 2,-1,-1)
  293.            ELSE
  294.               CALL ZoomBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,-1,-1)
  295.            END IF
  296.         ELSE
  297.            IF IsColr% THEN
  298.               CALL MakeBox(rw%,apart%,6,10,x% MOD 8,7-(x% MOD 8),_
  299.                    0,0,x% MOD 2,-1,-1)
  300.            ELSE
  301.               CALL MakeBox(rw%,apart%,6,10,7,0,2,0,x% MOD 2,-1,-1)
  302.            END IF
  303.         END IF
  304.      END IF
  305.      CALL Ctrbox(2,"Window")
  306.      CALL Ctrbox(3,num$(x%))
  307.      IF x% = 9 THEN
  308.         IF IsColr% THEN
  309.            CALL Boxtitle(2,"Press",16,-1)
  310.         ELSE
  311.            CALL BoxTitle(2,"Press",31,0)
  312.         END IF
  313.      END IF
  314.      IF x% = 10 THEN
  315.         IF IsColr% THEN
  316.            CALL Boxtitle(2,"Spacebar",16,-1)
  317.         ELSE
  318.            CALL BoxTitle(2,"Spacebar",31,0)
  319.         END IF
  320.      END IF
  321.      INCR apart% , 12
  322.  NEXT
  323.  
  324.  CALL Minorpause(12," ")
  325. END SUB
  326.  
  327. '[******************]
  328.  
  329.  
  330. SUB Screen4'frames
  331. SHARED Zoom
  332.  IF Zoom THEN
  333.     IF IsColr% THEN
  334.        CALL ZoomBox(10,25,5,30,%green,%black,0,0,0,-1,-1)
  335.     ELSE
  336.        CALL ZoomBox(10,25,5,30,7,0,0,0,0,-1,-1)
  337.     END IF
  338.  ELSE
  339.     IF IsColr% THEN
  340.        CALL MakeBox(10,25,5,30,%green,%black,0,0,0,-1,-1)
  341.     ELSE
  342.        CALL MakeBox(10,25,5,30,7,0,0,0,0,-1,-1)
  343.     END IF
  344.  END IF
  345.  CALL Ctrbox(2,"There are 10 Frames available:")
  346. END SUB
  347.  
  348. '[******************]
  349.  
  350. SUB Pointers'for frames
  351.  CALL Ctrbox(1,CHR$(24))
  352.  CALL Prtbox(3,1,CHR$(27))
  353.  CALL Prtbox(3,20,CHR$(26))
  354.  CALL Ctrbox(5,CHR$(25))
  355. END SUB
  356.  
  357. '[******************]
  358.  
  359.  
  360. SUB Screen5'more frames
  361. SHARED num$(),Zoom
  362. LOCAL bfcc,brcc
  363.  
  364.  IF Zoom THEN
  365.     IF IsColr% THEN
  366.        CALL ZoomBox(3,3,7,22,%red,%white,0,0,0,-1,-1)
  367.     ELSE
  368.        CALL ZoomBox(3,3,7,22,0,7,0,0,0,-1,-1)
  369.     END IF
  370.  ELSE
  371.     IF IsColr% THEN
  372.        CALL MakeBox(3,3,7,22,%red,%white,0,0,0,-1,-1)
  373.     ELSE
  374.        CALL MakeBox(3,3,7,22,0,7,0,0,0,-1,-1)
  375.     END IF
  376.  END IF
  377.  CALL Pointers
  378.  CALL Ctrbox(2,"Window")
  379.  CALL Ctrbox(3,"with")
  380.  CALL Ctrbox(4,"No Frame")
  381.  
  382.  IF Zoom THEN
  383.     IF IsColr% THEN
  384.        CALL ZoomBox(3,55,7,22,%brown,%blue,1,0,0,-1,-1)
  385.     ELSE
  386.        CALL ZoomBox(3,55,7,22,0,7,1,0,0,-1,-1)
  387.     END IF
  388.  ELSE
  389.     IF IsColr% THEN
  390.        CALL MakeBox(3,55,7,22,%brown,%blue,1,0,0,-1,-1)
  391.     ELSE
  392.        CALL MakeBox(3,55,7,22,0,7,1,0,0,-1,-1)
  393.     END IF
  394.  END IF
  395.  CALL Pointers
  396.  CALL Ctrbox(3,"Single")
  397.  
  398.  
  399.  
  400.  IF Zoom THEN
  401.     CALL ZoomBox(17,3,7,22,%black,%white,2,0,0,-1,-1)
  402.  ELSE
  403.     CALL MakeBox(17,3,7,22,%black,%white,2,0,0,-1,-1)
  404.  END IF
  405.  CALL Pointers
  406.  CALL Ctrbox(3,"Double")
  407.  
  408.  IF IsColr% THEN
  409.     frcc = %red
  410.     bfcc = %cyan
  411.  ELSE
  412.     frcc = %black
  413.     bfcc = %White
  414.  END IF
  415.  IF Zoom THEN
  416.     CALL ZoomBox(17,55,7,22,frcc,%white,3,0,0,-1,-1)
  417.  ELSE
  418.     CALL MakeBox(17,55,7,22,frcc,%white,3,0,0,-1,-1)
  419.  END IF
  420.  CALL Pointers
  421.  CALL Ctrbox(2,"Single Horizontal")
  422.  CALL Ctrbox(4,"Double Vertical")
  423.  
  424.  
  425.  IF Zoom THEN
  426.     CALL ZoomBox(17,29,7,22,%black,bfcc,4,0,0,-1,-1)
  427.  ELSE
  428.     CALL MakeBox(17,29,7,22,%black,bfcc,4,0,0,-1,-1)
  429.  END IF
  430.  CALL Pointers
  431.  CALL Ctrbox(2,"Double Horizontal")
  432.  CALL Ctrbox(4,"Single Vertical")
  433.  
  434.  IF Zoom THEN
  435.     CALL ZoomBox(3,29,7,22,%black,bfcc,5,0,0,-1,-1)
  436.  ELSE
  437.     CALL MakeBox(3,29,7,22,%black,bfcc,5,0,0,-1,-1)
  438.  END IF
  439.  CALL Pointers
  440.  CALL Ctrbox(2,"Single Horizontal")
  441.  CALL Ctrbox(4,"No  Vertical")
  442.  DELAY .53
  443.  CALL Pause(7)
  444. END SUB
  445.  
  446. '[******************]
  447.  
  448.  
  449. SUB Screen5a'more frames
  450. SHARED num$(),Zoom
  451. LOCAL frcc,bfcc,ffcc
  452.  
  453.  IF IsColr% THEN
  454.     frcc = %red
  455.     bfcc = %cyan
  456.  ELSE
  457.     frcc = %black
  458.     bfcc = %White
  459.  END IF
  460.  IF Zoom THEN
  461.     CALL ZoomBox(3,3,7,22,frcc,%white,7,0,0,-1,-1)
  462.  ELSE
  463.     CALL MakeBox(3,3,7,22,frcc,%white,7,0,0,-1,-1)
  464.  END IF
  465.  CALL Pointers
  466.  CALL Ctrbox(2,"Window")
  467.  CALL Ctrbox(3,"with")
  468.  CALL Ctrbox(4,"Solid Frame")
  469.  
  470.  IF IsColr% THEN
  471.     ffcc = %brown
  472.     frcc = %blue
  473.  ELSE
  474.     ffcc = %black
  475.     ffcc = %white
  476.  END IF
  477.  
  478.  IF Zoom THEN
  479.     CALL ZoomBox(3,55,7,22,ffcc,frcc,8,0,0,-1,-1)
  480.  ELSE
  481.     CALL MakeBox(3,55,7,22,ffcc,frcc,8,0,0,-1,-1)
  482.  END IF
  483.  CALL Pointers
  484.  CALL Ctrbox(3,"Light Hatch")
  485.  
  486.  IF Zoom THEN
  487.     CALL ZoomBox(17,3,7,22,%black,%white,9,0,0,-1,-1)
  488.  ELSE
  489.     CALL MakeBox(17,3,7,22,%black,%white,9,0,0,-1,-1)
  490.  END IF
  491.  CALL Pointers
  492.  CALL Ctrbox(3,"Medium Hatch")
  493.  
  494.  IF IsColr% THEN
  495.     ffcc = %red
  496.  ELSE
  497.     ffcc = %black
  498.  END IF
  499.  IF Zoom THEN
  500.     CALL ZoomBox(17,55,7,22,ffcc,%white,10,0,0,-1,-1)
  501.  ELSE
  502.     CALL MakeBox(17,55,7,22,ffcc,%white,10,0,0,-1,-1)
  503.  END IF
  504.  CALL Pointers
  505.  CALL Ctrbox(3,"Heavy Hatch")
  506.  IF IsColr% THEN
  507.     frcc = %cyan
  508.  ELSE
  509.     frcc = %white
  510.  END IF
  511.  
  512.  IF Zoom THEN
  513.     CALL ZoomBox(10,29,7,22,%black,frcc,6,0,0,-1,-1)
  514.  ELSE
  515.     CALL MakeBox(10,29,7,22,%black,frcc,6,0,0,-1,-1)
  516.  END IF
  517.  CALL Pointers
  518.  CALL Ctrbox(2,"Double Horizontal")
  519.  CALL Ctrbox(4,"No Vertical")
  520.  
  521.  DELAY .53
  522.  CALL Pause(5)
  523. END SUB
  524.  
  525.  
  526. '[******************]
  527.  
  528.  
  529. SUB Screen6'shadows
  530. SHARED Standalone%
  531. LOCAL brc
  532.  IF IsColr% THEN bcr = %red ELSE bcr = %black
  533.  CALL MakeBox(0,1,26,80,%white,bcr,13,0,0,-1,-1)
  534.  CALL CtrBox(1,"- And that Government of the People -")
  535.  CALL CtrBox(25,"President Lincoln, Gettysburg National Cemetery,"+_
  536.       " Nov 10, 1863")
  537.  CALL Prtbox(2,0,CHR$(34)+"█████")
  538.  CALL Prtbox(3,1,"█  our score and seven years ago,  our fathers brought"+_
  539.       " forth on this continent")
  540.  CALL Prtbox(4,1,"██ a new nation conceived in liberty and dedicated to"+_
  541.       " the proposition that all")
  542.  CALL Prtbox(5,1,"█  men are  created  equal.  Now we are engaged in a"+_
  543.       " great  civil war  testing")
  544.  CALL Prtbox(6,1,"█  whether  that  nation  or any nation so conceived and"+_
  545.       " so dedicated can long")
  546.  CALL PrtBox(7,1,"endure.  We are met  on  a great  battlefield of that  war."+_
  547.       "  We have  come  to")
  548.  CALL PrtBox(8,1,"dedicate  a portion of that field  as a final resting"+_
  549.       " place for those who here")
  550.  CALL PrtBox(9,1,"gave  their lives that  that nation might live.  It is"+_
  551.       "  altogether fitting and")
  552.  IF Standalone%  THEN l% = 13 ELSE l% = 16
  553.  CALL PrtBox(10,1,"proper that we should do this.  But in a larger sense we"+_
  554.       " cannot  dedicate,  we")
  555.  CALL PrtBox(11,1,"cannot consecrate, we cannot hallow this ground. The"+_
  556.       " brave men,living and dead")
  557.  CALL PrtBox(12,1,"who struggled here  have  consecrated it  far above  our"+_
  558.       " poor  power to add or")
  559.  CALL PrtBox(l%,1,"detract.  The world will little note nor long remember"+_
  560.       " what we say here. It is")
  561.  CALL PrtBox(l%+1,1,"for us the living  rather to  be  dedicated  here to"+_
  562.       " the unfinished work which")
  563.  CALL PrtBox(l%+2,1,"they  who fought here  have thus far so nobly advanced."+_
  564.       " It is rather for us to")
  565.  CALL PrtBox(l%+3,1,"be  here  dedicated to  the  great task  remaining before us"+_
  566.       " that  from  these")
  567.  CALL PrtBox(l%+4,1,"honored dead  we take increased devotion to that cause for which"+_
  568.       " they gave the")
  569.  CALL PrtBox(l%+5,1,"last  full  measure  of devotion - that we here highly resolve"+_
  570.       " that these dead")
  571.  CALL PrtBox(l%+6,1,"shall not have died in vain, that this nation under God"+_
  572.       " shall have a new birth")
  573.  CALL PrtBox(l%+7,1,"of freedom  and that government of the people, by"+_
  574.       " the people,  for the people,")
  575.  CALL PrtBox(l%+8,1,"shall not perish from the earth."+CHR$(34))
  576.  IF NOT Standalone%  THEN
  577.     CALL MakeBox(13,15,3,52,%white,bcr,1,0,0,-1,-1)
  578.     CALL CtrBox(1,"There are 10 Shadows available:")
  579.     DELAY .4
  580.  END IF
  581. END SUB
  582.  
  583. '[******************]
  584.  
  585.  
  586. SUB Screen7'more shadows
  587. SHARED num$(),Zoom
  588. LOCAL x%,a$,a!,b!,fcr,bcr
  589.  IF IsColr% THEN fcr = %red ELSE fcr = %black
  590.  IF Zoom THEN
  591.     CALL ZoomBox(3,3,7,22,fcr,%white,1,0,0,-1,-1)
  592.  ELSE
  593.     CALL MakeBox(3,3,7,22,fcr,%white,1,0,0,-1,-1)
  594.  END IF
  595.  CALL Pointers
  596.  CALL Ctrbox(2,"Window")
  597.  CALL Ctrbox(3,"with")
  598.  CALL Ctrbox(4,"No Shadow")
  599.  
  600.  IF IsColr% THEN
  601.     fcr = %brown
  602.     bcr = %blue
  603.  ELSE
  604.     fcr = %black
  605.     bcr = %white
  606.  END IF
  607.  
  608.  IF Zoom THEN
  609.     CALL ZoomBox(17,55,7,22,fcr,bcr,1,1,0,-1,-1)
  610.  ELSE
  611.     CALL MakeBox(17,55,7,22,fcr,bcr,1,1,0,-1,-1)
  612.  END IF
  613.  CALL Prtbox(3,1,CHR$(27))
  614.  CALL Ctrbox(5,CHR$(25))
  615.  CALL Ctrbox(2,"Left Drop")
  616.  CALL Ctrbox(3,"Solid Shadow")
  617.  
  618.  IF Zoom THEN
  619.     CALL ZoomBox(10,29,7,22,%black,%white,1,2,0,-1,-1)
  620.  ELSE
  621.     CALL MakeBox(10,29,7,22,%black,%white,1,2,0,-1,-1)
  622.  END IF
  623.  CALL Ctrbox(5,CHR$(25))
  624.  CALL Prtbox(3,20,CHR$(26))
  625.  CALL Ctrbox(2,"Right Drop")
  626.  CALL Ctrbox(3,"Solid Shadow")
  627.  IF IsColr% THEN  fcr = 20 ELSE fcr = 31
  628.  CALL Boxtitle(2,"Press Spacebar",fcr,7)
  629.  
  630.  IF IsColr% THEN fcr = %red ELSE fcr = %black
  631.  IF Zoom THEN
  632.     CALL ZoomBox(3,55,7,22,fcr,%white,1,3,0,-1,-1)
  633.  ELSE
  634.     CALL MakeBox(3,55,7,22,fcr,%white,1,3,0,-1,-1)
  635.  END IF
  636.  CALL Prtbox(3,1,CHR$(27))
  637.  CALL Ctrbox(5,CHR$(25))
  638.  CALL Ctrbox(2,"Left Drop")
  639.  CALL Ctrbox(3,"Transparent Shadow")
  640.  
  641.  IF IsColr% THEN bcr = %cyan ELSE bcr = %white
  642.  IF Zoom THEN
  643.     CALL ZoomBox(17,3,7,22,%black,bcr,1,4,0,-1,-1)
  644.  ELSE
  645.     CALL MakeBox(17,3,7,22,%black,bcr,1,4,0,-1,-1)
  646.  END IF
  647.  CALL Ctrbox(5,CHR$(25))
  648.  CALL Prtbox(3,20,CHR$(26))
  649.  CALL Ctrbox(2,"Right Drop")
  650.  CALL Ctrbox(3,"Transparent Shadow")
  651.  a! = TIMER
  652.  DO
  653.      B! = TIMER
  654.      IF INSTAT THEN
  655.         a$=INKEY$
  656.         IF A$ = " " THEN EXIT LOOP
  657.      END IF
  658.  LOOP UNTIL b! = > a! + %AutoTime + AutoFudge%
  659.  FOR x% = 1 TO 5
  660.      CALL Removebox
  661.  NEXT
  662.  IF Zoom THEN
  663.     CALL ZoomBox(3,55,7,22,fcr,%white,1,5,0,-1,-1)
  664.  ELSE
  665.     CALL MakeBox(3,55,7,22,fcr,%white,1,5,0,-1,-1)
  666.  END IF
  667.  CALL Prtbox(3,1,CHR$(27))
  668.  CALL Ctrbox(5,CHR$(25))
  669.  CALL Ctrbox(2,"Left Drop")
  670.  CALL Ctrbox(3,"Light Hatch")
  671.  CALL Ctrbox(4,"Shadow")
  672.  
  673.  IF IsColor THEN
  674.     fcr = %brown
  675.     bcr = %blue
  676.  ELSE
  677.     fcr = %black
  678.     bcr = %white
  679.  END IF
  680.  IF Zoom THEN
  681.     CALL ZoomBox(3,3,7,22,fcr,bcr,1,6,0,-1,-1)
  682.  ELSE
  683.     CALL MakeBox(3,3,7,22,fcr,bcr,1,6,0,-1,-1)
  684.  END IF
  685.  CALL Prtbox(3,20,CHR$(26))
  686.  CALL Ctrbox(5,CHR$(25))
  687.  CALL Ctrbox(2,"Right Drop")
  688.  CALL Ctrbox(3,"Light Hatch")
  689.  CALL Ctrbox(4,"Shadow")
  690.  
  691.  IF Zoom THEN
  692.     CALL ZoomBox(17,3,7,22,%black,%white,1,7,0,-1,-1)
  693.  ELSE
  694.     CALL MakeBox(17,3,7,22,%black,%white,1,7,0,-1,-1)
  695.  END IF
  696.  CALL Ctrbox(5,CHR$(25))
  697.  CALL Prtbox(3,1,CHR$(27))
  698.  CALL Ctrbox(2,"Left Drop")
  699.  CALL Ctrbox(3,"Medium Hatch")
  700.  CALL Ctrbox(4,"Shadow")
  701.  
  702.  IF IsColr% THEN fcr = %red ELSE fcr = %black
  703.  IF Zoom THEN
  704.     CALL ZoomBox(17,55,7,22,fcr,%white,1,8,0,-1,-1)
  705.  ELSE
  706.     CALL MakeBox(17,55,7,22,fcr,%white,1,8,0,-1,-1)
  707.  END IF
  708.  CALL Prtbox(3,20,CHR$(26))
  709.  CALL Ctrbox(5,CHR$(25))
  710.  CALL Ctrbox(2,"Right Drop")
  711.  CALL Ctrbox(3,"Medium Hatch")
  712.  CALL Ctrbox(4,"Shadow")
  713.  
  714.  IF IsColr% THEN bcr = %cyan ELSE bcr = %white
  715.  
  716.  IF Zoom THEN
  717.     CALL ZoomBox(3,29,7,22,%black,bcr,1,9,0,-1,-1)
  718.  ELSE
  719.     CALL MakeBox(3,29,7,22,%black,bcr,1,9,0,-1,-1)
  720.  END IF
  721.  CALL Ctrbox(5,CHR$(25))
  722.  CALL Prtbox(3,1,CHR$(27))
  723.  CALL Ctrbox(2,"Left Drop")
  724.  CALL Ctrbox(3,"Heavy Hatch")
  725.  CALL Ctrbox(4,"Shadow")
  726.  
  727.  IF Zoom THEN
  728.     CALL ZoomBox(17,29,7,22,%black,bcr,1,10,0,-1,-1)
  729.  ELSE
  730.     CALL MakeBox(17,29,7,22,%black,bcr,1,10,0,-1,-1)
  731.  END IF
  732.  CALL Ctrbox(5,CHR$(25))
  733.  CALL Prtbox(3,20,CHR$(26))
  734.  CALL Ctrbox(2,"Right Drop")
  735.  CALL Ctrbox(3,"Heavy Hatch")
  736.  CALL Ctrbox(4,"Shadow")
  737.  IF IsColr% THEN  fcr = 20 ELSE fcr = 31
  738.  CALL Boxtitle(2,"Press Spacebar",fcr,7)
  739.  a! = TIMER
  740.  DO
  741.      b! = TIMER
  742.      IF INSTAT THEN
  743.         a$ = INKEY$
  744.         IF A$ = " " THEN EXIT LOOP
  745.      END IF
  746.  LOOP UNTIL b!=>A! +%AutoTime + AutoFudge
  747.  
  748.  FOR x% = 1 TO 6
  749.      CALL Removebox
  750.  NEXT
  751.  IF IsColr% THEN
  752.     CALL Boxtitle(6,"Press Spacebar",23,%red)
  753.  ELSE
  754.     CALL BoxTitle(6,"Press Spacebar",31,0)
  755.  END IF
  756.  CALL Minorpause(2," ")
  757.  
  758. END SUB
  759.  
  760. '[******************]
  761.  
  762.  
  763.  
  764. SUB Screen8'Title demo
  765. SHARED num$()
  766. LOCAL a!,b!,fcr,fbcr,bbcr,bcr,cc1,cc2,cc3,bk,i
  767.  IF IsColr% THEN fcr = %green ELSE fcr = %white
  768.  CALL MakeBox(9,28,5,51,fcr,%black,0,0,0,-1,-1)
  769.  CALL Ctrbox(2,"There are 12 Title Positions available:")
  770.  CALL Ctrbox(3,"6 Horizontal and 6 vertical")
  771.  IF IsColr% THEN
  772.     fcr = %red
  773.  ELSE
  774.     fcr = %black
  775.  END IF
  776.  CALL MakeBox(3,35,7,28,fcr,%white,1,0,0,%white,fcr)
  777.  CALL Ctrallbox(1,4,"Window")
  778.  CALL Ctrallbox(2,4,"with")
  779.  CALL Ctrallbox(3,4,"Horizontal")
  780.  CALL Ctrallbox(4,4,"Titles in top and bottom")
  781.  CALL Boxtitle(1,num$(1),-1,-1)
  782.  CALL Boxtitle(2,num$(2),-1,-1)
  783.  CALL Boxtitle(3,num$(3),-1,-1)
  784.  CALL Boxtitle(4,num$(4),-1,-1)
  785.  CALL Boxtitle(5,num$(5),-1,-1)
  786.  CALL Boxtitle(6,num$(6),-1,-1)
  787.  
  788.  IF IsColr% THEN
  789.     fbcr = %yellow
  790.     bbcr = %blue
  791.  ELSE
  792.     fbcr = %white
  793.     bbcr = %black
  794.  END IF
  795.  CALL MakeBox(14,35,9,28,%black,%white,1,1,0,fbcr,bbcr)
  796.  CALL Ctrallbox(1,4,"Window")
  797.  CALL Ctrallbox(2,4,"with")
  798.  CALL Ctrallbox(3,4,"Horizontal and Vertical")
  799.  CALL Ctrallbox(4,4,"Titles Centered")
  800.  CALL Boxtitle(2,num$(2),-1,-1)
  801.  CALL Boxtitle(5,num$(5),-1,-1)
  802.  CALL Boxtitle(7,num$(7),-1,-1)
  803.  CALL Boxtitle(8,num$(8),-1,-1)
  804.  
  805.  IF IsColr% THEN
  806.     bcr = %green
  807.     ffcr = %red
  808.  ELSE
  809.     bcr = %white
  810.     ffcr = %black
  811.  END IF
  812.  CALL MakeBox(3,4,21,24,%black,bcr,1,2,0,ffcr,%white)
  813.  CALL Ctrallbox(1,4,"Window")
  814.  CALL Ctrallbox(2,4,"with")
  815.  CALL Ctrallbox(3,4,"Vertical")
  816.  CALL Ctrallbox(4,4,"Titles in Four Corners")
  817.  CALL Boxtitle(9,num$(9),-1,-1)
  818.  CALL Boxtitle(10,num$(10),-1,-1)
  819.  CALL Boxtitle(11,num$(11),-1,-1)
  820.  CALL Boxtitle(12,num$(12),-1,-1)
  821.  CALL Pause(4)
  822.  
  823.  IF IsColr% THEN
  824.     cc1 = %blue
  825.     cc2 = %cyan
  826.     cc3 = %blue
  827.     bk = 1
  828.  ELSE
  829.     cc1 = %black
  830.     cc2 = %black
  831.     cc3 = %white
  832.     bk = 4
  833.  END IF
  834.  CALL MakeBox(10,26,9,28,%white,cc1,bk,1,0,cc3,cc2)
  835.  CALL Ctrallbox(1,6,"This demo shows")
  836.  CALL Ctrallbox(2,6,"removal of a title")
  837.  CALL Ctrallbox(3,6,"and restoring the")
  838.  CALL Ctrallbox(4,6,"original border")
  839.  CALL CtrAllBox(6,6,"Press any key to remove")
  840.  CALL Boxtitle(2,"Watch this title",-1,-1)
  841.  a! = TIMER
  842.  DO
  843.      b! = TIMER
  844.      IF INSTAT THEN
  845.         j$ = INKEY$
  846.         EXIT LOOP
  847.      END IF
  848.  LOOP UNTIL B! => A! + %AutoTime +AutoFudge%
  849.  CALL BoxTitle(2,"",-1,-1)
  850.  FOR i = 1 TO 6
  851.      CALL PrtEol(i,1)
  852.  NEXT
  853.  CALL CtrAllBox(1,1,"Notice: No title!")
  854.  CALL Pause(1)
  855. END SUB
  856.  
  857. '[******************]
  858.  
  859.  
  860. SUB Screen9'menus
  861. SHARED mlist$(),num$()
  862. LOCAL cc1,cc2,barc,textbc,highb,highc
  863.  mlist$(1) = "Onions"
  864.  mlist$(2) = "Beets"
  865.  mlist$(3) = "Peas"
  866.  mlist$(4) = "Tomatoes"
  867.  mlist$(5) = "Beans"
  868.  mlist$(6) = "Corn"
  869.  mlist$(7) = "Carrots"
  870.  mlist$(8) = ""
  871.  mitem% =1
  872.  CALL Screen9a("Menu 1 has first letter$selection and a Pointer to$the"+_
  873.       " item. Press Enter after$selecting.")
  874.  IF IsColr% THEN
  875.     cc1 = %white
  876.     cc2 = %blue
  877.     cc3 = %Black
  878.     cc4 = %Red
  879.  ELSE
  880.     cc1 = %White
  881.     cc2 = %Black
  882.     cc3 = cc2
  883.     cc4 = cc1
  884.  END IF
  885.  CALL MakeBox(10,39,9,22,cc1,cc2,1,1,0,cc3,cc4)
  886.  CALL Boxtitle(2,"Menu",-1,-1)
  887.  IF IsColr% THEN
  888.     barc = %Cyan
  889.     textbc = %BrightWhite
  890.     highb = -1
  891.     highc = %BrightWhite
  892.     PtrCol% = %Red
  893.  ELSE
  894.     barc = %White
  895.     textbc = %BrightWhite
  896.     highb = %Black
  897.     highc = %BrightWhite
  898.     PtrCol% = %BrightWhite
  899.  END IF
  900.  
  901.  CALL Buildmenu_
  902.       (mitem%,1,-1,0,highc,highb,textbc,barc,3,mlist$(),-1,PtrCol%)
  903.  $IF 0
  904.       \    \  \  \  \    \     \      \    \    \    \__ AutoRun
  905.        \    \  \  \  \    \     \      \    \    \______ The list
  906.         \    \  \  \  \    \     \      \    \__________ BmBar (Bar type)
  907.          \    \  \  \  \    \     \      \___________ Bar color
  908.           \    \  \  \  \    \     \____________ Text in a bar color
  909.            \    \  \  \  \    \_____________ Highlight background
  910.             \    \  \  \  \_______________ Highlight text color
  911.          \    \  \  \_________________ <ENTER> reqd if true
  912.           \    \  \___________________ Select + highlight char
  913.            \    \_____________________ Item to first highlight
  914.            \_________________________ returns selected item
  915.  
  916.  $ENDIF
  917.  
  918.  CALL Boxtitle(5,mlist$(mitem%)+" selected",-1,-1)
  919.  CALL Pause(2)
  920.  mlist$(1) = "Power"
  921.  mlist$(2) = "BASIC"
  922.  mlist$(3) = "Is"
  923.  mlist$(4) = "The"
  924.  mlist$(5) = "Best"
  925.  mlist$(6) = "And"
  926.  mlist$(7) = "Fastest"
  927.  mlist$(8) = "@#$"
  928.  CALL Screen9a("Menu 2 has first letter$and full bar. Pressing$the key"+_
  929.       " of the first$character selects.")
  930.  CALL MakeBox(10,39,9,22,cc1,cc2,1,1,0,cc3,cc4)
  931.  CALL Boxtitle(2,"Menu",-1,-1)
  932.  CALL Buildmenu(mitem%,1,-1,0,highc,highb,textbc,barc,2,mlist$(),-1,PtrCol%)
  933.  CALL Boxtitle(5,mlist$(mitem%)+" selected",-1,-1)
  934.  CALL Pause(2)
  935.  mlist$(1) = "Windows"
  936.  mlist$(2) = "Windows"
  937.  mlist$(3) = "Boxes"
  938.  mlist$(4) = "Both"
  939.  mlist$(5) = "Wonderful"
  940.  mlist$(6) = "Better"
  941.  mlist$(7) = "Fastest"
  942.  mlist$(8) = "@#$"
  943.  CALL Screen9a("First letter selection.$Enter is required. If two$"+_
  944.       "First letters are the$same, press the key again.")
  945.  CALL MakeBox(10,39,9,22,cc1,cc2,1,1,0,cc3,cc4)
  946.  CALL Boxtitle(2,"Menu",-1,-1)
  947.  CALL Buildmenu(mitem%,1,-1,-1,highc,highb,textbc,barc,1,mlist$(),-1,PtrCol%)
  948.  CALL Boxtitle(5,mlist$(mitem%)+" selected",-1,-1)
  949.  CALL Pause(2)
  950. END SUB
  951.  
  952. '[******************]
  953.  
  954. SUB Screen9a(message$)
  955. LOCAL mesline$(),p%,k%,Height%,x%
  956.  Height = TALLY(Message$,"$")
  957.  REDIM MesLine$(Height)
  958.  FOR X = 1 TO Height
  959.      p% = INSTR(message$,"$")
  960.      MesLine$(x) = LEFT$(Message$,p%-1)
  961.      Message$ = MID$(Message$,p%+1)
  962.  NEXT
  963.  MesLine$(x) = Message$
  964.  IF IsColr% THEN
  965.     CALL MakeBox(17,3,Height+3,29,%black,%green,1,2,0,%red,%white)
  966.  ELSE
  967.     CALL MakeBox(17,3,Height+3,29,%Black,%White,1,2,0,%black,%White)
  968.  END IF
  969.  FOR x = 1 TO Height+1
  970.      CALL Prtbox(x,1,mesline$(x))
  971.  NEXT
  972. END SUB
  973.  
  974. '[******************]
  975.  
  976. SUB Screen10
  977. SHARED Standalone%,a$
  978. LOCAL A!,b!
  979.  Standalone% = %True
  980.  CALL Screen6
  981.  Standalone% = %False
  982.  IF IsColr THEN cc3 = %Black ELSE cc3 = %BrightWhite
  983.  CALL PrtAttrBox(23,55,"[Any key to Recolor]",cc3,-1)
  984.  A! = TIMER
  985.  DO
  986.      b! = TIMER
  987.      IF INSTAT THEN
  988.         a$ = INKEY$
  989.         EXIT LOOP
  990.      END IF
  991.  LOOP UNTIL B!=>A!+%AutoTime +AutoFudge%
  992.  IF IsColr% THEN
  993.     CALL Recolor(%Black,%Brown,-1,-1)
  994.  ELSE
  995.     CALL Recolor(%Black,%White,-1,-1)
  996.  END IF
  997.  CALL PrtEol(23,55)
  998.  IF IsColr% THEN
  999.     CALL PrtAttrBox(23,55,"[Any key to Recolor]",%Red,-1)
  1000.  ELSE
  1001.     CALL PrtAttrBox(23,55,"[Any key to Recolor]",15,-1)
  1002.  END IF
  1003.  A! = TIMER
  1004.  DO
  1005.      b! = TIMER
  1006.      IF INSTAT THEN
  1007.         a$ = INKEY$
  1008.         EXIT LOOP
  1009.      END IF
  1010.  LOOP UNTIL B!=>A!+%AutoTime +AutoFudge%
  1011.  IF IsColr% THEN cc2 = %Blue ELSE cc2 = %black
  1012.  CALL Recolor(%BrightWhite,cc2,-1,-1)
  1013.  CALL PrtEol(23,55)
  1014.  IF IsColr% THEN cc3 = %Green ELSE cc3 = %White
  1015.  CALL PrtAttrBox(23,55,"[Any key for menu]",cc3,-1)
  1016.  A! = TIMER
  1017.  DO
  1018.      b! = TIMER
  1019.      IF INSTAT THEN
  1020.         a$ = INKEY$
  1021.         EXIT LOOP
  1022.      END IF
  1023.  LOOP UNTIL B!=>A!+%AutoTime+AutoFudge%
  1024. END SUB
  1025.  
  1026. '[******************]
  1027.  
  1028. SUB Screen11' horizontal pull down menu
  1029. ' This can be pulled down and moved with the <-- and --> keys
  1030. LOCAL Window1$,Window2$,Window3$,window4$
  1031. SHARED NewPlace
  1032.  Window1$ = "PBWindow Info"
  1033.  Window2$ = "System Info"
  1034.  Window3$ = "Date & Time"
  1035.  Window4$ = "Quit"
  1036.  IF IsColr% THEN
  1037.     AtFc% = %Red
  1038.     AtBc% = -1
  1039.  ELSE
  1040.     AtFc% = %White
  1041.     AtBc% = %Black
  1042.  END IF
  1043.  
  1044. ' good for mono and color.. b&w window across the top
  1045.  CALL MakeBox(1,1,1,79,0,7,0,0,0,-1,-1)
  1046.  CALL PrtBox(0,1,Window1$)
  1047.  CALL PrtBox(0,20,Window2$)
  1048.  CALL PrtBox(0,40,Window3$)
  1049.  CALL PrtBox(0,60,Window4$)
  1050.  CALL PrtAttrBox(0,1,Window1$,AtFc%,AtBc)
  1051.  place = 1
  1052.  FallThrough = %False
  1053.  DO
  1054.      a! = TIMER
  1055.      SetUp = %False
  1056.      DO
  1057.          b! = TIMER
  1058.          IF INSTAT THEN
  1059.             A$ = INKEY$
  1060.             EXIT LOOP
  1061.          END IF
  1062.          IF NOT SetUp THEN
  1063.             IF NOT FallThrough THEN
  1064.                a$ = CHR$(13)
  1065.                FallThrough = %True
  1066.             ELSE
  1067.                FallThrough = %False
  1068.                a$ = CHR$(0,77)
  1069.             END IF
  1070.             SetUp = %True
  1071.          END IF
  1072.      LOOP UNTIL b!=>A! +%AutoTime +AutoFudge
  1073.      match$=UCASE$(LEFT$(Window1$,1)+LEFT$(Window2$,1)+_
  1074.             LEFT$(Window3$,1)+LEFT$(Window4$,1))
  1075.  
  1076.      IF INSTR(UCASE$(a$),ANY Match$)>0  THEN a$="$$"+UCASE$(a$)
  1077.      NewPlace = %False
  1078.      Moved = %False
  1079.      ExitBigLoop = %False
  1080.      DO
  1081.          SELECT CASE LEN(a$)
  1082.                 CASE 1
  1083.                      SELECT CASE a$
  1084.                             CASE CHR$(13)'enter  this one iwl be scren 11
  1085.                                  Moved = %False
  1086.                                  IF Place = 4 THEN
  1087.                                     EXITBigLoop = %True
  1088.                                     EXIT LOOP
  1089.                                  ELSE
  1090.                                     CALL Screen12(Place)
  1091.                                     IF NewPlace THEN
  1092.                                        A$ = KeyHit$
  1093.                                        Moved = %True
  1094.                                     END IF
  1095.                                  END IF
  1096.                      END SELECT
  1097.                 CASE 2
  1098.                      SELECT CASE ASC(MID$(a$,2,1))
  1099.                             CASE 75' <---
  1100.                                  SELECT CASE place
  1101.                                         CASE 1
  1102.                                              CALL PrtBox(0,1,Window1$)
  1103.                                              CALL PrtAttrBox(0,60,Window4$,_
  1104.                                                   AtFc%,AtBc%)
  1105.                                              place = 4
  1106.                                         CASE 2
  1107.                                              CALL PrtBox(0,20,Window2$)
  1108.                                              CALL PrtAttrBox(0,1,Window1$,_
  1109.                                                   AtFc%,AtBc%)
  1110.                                              place = place -1
  1111.                                         CASE 3
  1112.                                              CALL PrtBox(0,40,Window3$)
  1113.                                              CALL PrtAttrBox(0,20,Window2$,_
  1114.                                                   AtFc%,AtBc%)
  1115.                                              place = place -1
  1116.                                         CASE 4
  1117.                                              CALL PrtBox(0,60,Window4$)
  1118.                                              CALL PrtAttrBox(0,40,Window3$,_
  1119.                                                   AtFc%,AtBc%)
  1120.                                              place = place -1
  1121.                                  END SELECT
  1122.                             CASE 77'--->
  1123.                                  SELECT CASE Place
  1124.                                         CASE 4
  1125.                                              CALL PrtBox(0,60,Window4$)
  1126.                                              CALL PrtAttrBox(0,1,Window1$,_
  1127.                                                   AtFc%, AtBc%)
  1128.                                              Place = 1
  1129.                                         CASE 3
  1130.                                              CALL PrtBox(0,40,Window3$)
  1131.                                              CALL PrtAttrBox(0,60,Window4$,_
  1132.                                                   AtFc%,AtBc%)
  1133.                                              INCR Place
  1134.                                         CASE 2
  1135.                                              CALL PrtBox(0,20,Window2$)
  1136.                                              CALL PrtAttrBox(0,40,Window3$,_
  1137.                                                   AtFc%,AtBc%)
  1138.                                              INCR Place
  1139.                                         CASE 1
  1140.                                              CALL PrtBox(0,1,Window1$)
  1141.                                              CALL PrtAttrBox(0,20,Window2$,_
  1142.                                                   AtFc%,AtBc%)
  1143.                                              INCR Place
  1144.                                  END SELECT
  1145.                             CASE 71'home
  1146.                                  SELECT CASE Place
  1147.                                         CASE 1'nothing.. we are home
  1148.                                         CASE 2
  1149.                                              CALL PrtBox(0,20,Window2$)
  1150.                                         CASE 3
  1151.                                              CALL PrtBox(0,40,Window3$)
  1152.                                         CASE 4
  1153.                                              CALL PrtBox(0,60,Window4$)
  1154.                                  END SELECT
  1155.                                  place = 1
  1156.                                  CALL PrtAttrBox(0,1,Window1$,AtFc%,AtBc%)
  1157.                             CASE 79'end
  1158.                                  SELECT CASE place
  1159.                                         CASE 1
  1160.                                              CALL PrtBox(0,1,Window1$)
  1161.                                         CASE 2
  1162.                                              CALL PrtBox(0,20,Window2$)
  1163.                                         CASE 3
  1164.                                              CALL PrtBox(0,40,Window3$)
  1165.                                         CASE 4'nothing we are at the end
  1166.                                  END SELECT
  1167.                                  CALL PrtAttrBox(0,60,Window4$,AtFc%,AtBc%)
  1168.                                  Place = 4
  1169.                      END SELECT
  1170.                      IF Moved THEN
  1171.                         SELECT CASE Place
  1172.                                CASE 1
  1173.                                     A$ = "$$"+ LEFT$(Window1$,1)
  1174.                                CASE 2
  1175.                                     A$ = "$$"+ LEFT$(Window2$,1)
  1176.                                CASE 3
  1177.                                     A$ = "$$"+ LEFT$(Window3$,1)
  1178.                         END SELECT
  1179.                      END IF
  1180.                 CASE 3
  1181.                      SELECT CASE Place
  1182.                             CASE 1
  1183.                                  windo$=Window1$
  1184.                                  Spot = 1
  1185.                             CASE 2
  1186.                                  Windo$=Window2$
  1187.                                  Spot = 20
  1188.                             CASE 3
  1189.                                  Windo$= Window3$
  1190.                                  Spot = 40
  1191.                             CASE 4
  1192.                                  Windo$ = Window4$
  1193.                                  Spot = 60
  1194.                      END SELECT
  1195.                      SELECT CASE MID$(a$,3,1)
  1196.                             CASE LEFT$(Window1$,1)
  1197.                                  CALL PrtBox(0,Spot,Windo$)
  1198.                                  CALL PrtAttrBox(0,1,Window1$,AtFc%,AtBc%)
  1199.                                  Place = 1
  1200.                             CASE LEFT$(Window2$,1)
  1201.                                  CALL PrtBox(0,Spot,Windo$)
  1202.                                  CALL PrtAttrBox(0,20,Window2$,AtFc%,AtBc%)
  1203.                                  Place = 2
  1204.                             CASE LEFT$(Window3$,1)
  1205.                                  CALL PrtBox(0,Spot,Windo$)
  1206.                                  CALL PrtAttrBox(0,40,Window3$,AtFc%,AtBc%)
  1207.                                  Place = 3
  1208.                             CASE LEFT$(Window4$,1)
  1209.                                  CALL PrtBox(0,Spot,Windo$)
  1210.                                  CALL PrtAttrBox(0,60,Window4$,AtFc%,AtBc%)
  1211.                                  Place = 4
  1212.                      END SELECT
  1213.                      IF Moved THEN
  1214.                         A$ = CHR$(13)
  1215.                      END IF
  1216.          END SELECT
  1217.      LOOP UNTIL NOT MOVED
  1218.  LOOP UNTIL ExitBigLoop
  1219.  DO UNTIL Wpt% = 0
  1220.      CALL RemoveBox
  1221.  LOOP
  1222. END SUB
  1223.  
  1224. '[******************]
  1225.  
  1226. SUB Screen12(where)'places the asked for menues
  1227. SHARED NewPlace
  1228.  IF IsColr% THEN
  1229.     ofc1 = %white'Red
  1230.     obc1 = %Blue
  1231.     obfc1 = -1
  1232.     obbc1 = -1
  1233.     obbc2 = %Magenta
  1234.     obfc2 = %Green
  1235.     obc2 = %Cyan
  1236.     ofc2 = %Cyan
  1237.     ofc3 = %BLack
  1238.     obc3 = %Cyan
  1239.     obfc3 =%LtBlue
  1240.     obbc3 = %Blue
  1241.     ofc4 = %Red
  1242.     obc4 = %White
  1243.     obfc4 = %Black'Green
  1244.     obbc4 = %Magenta
  1245.     ofc5 = %black
  1246.     obc5 = %cyan
  1247.     obfc5 = %Red
  1248.     obbc4 = %White
  1249.  ELSE
  1250.     ofc1 = %White
  1251.     obc1 = %Black
  1252.     obfc1 = -1
  1253.     obbc1 = -1
  1254.     obfc2 = %Black
  1255.     obbc2 = %White
  1256.     obc2 = %White
  1257.     ofc2 = %Black
  1258.     ofc3 = %Black
  1259.     obc3 = %White
  1260.     obfc3 =%White
  1261.     obbc3 = %Black
  1262.     ofc4 = %White
  1263.     obc4 = %Black
  1264.     obfc4 =%White
  1265.     obbc4 = %Black
  1266.     ofc5 = %White
  1267.     obc5 = %Black
  1268.     obfc5 = %Black
  1269.     obbc5 = %White
  1270.  END IF
  1271.  SELECT CASE Where
  1272.         CASE 1
  1273. 'make 6 windows
  1274.              CALL MakeBox(2,2,4,17,ofc1,obc1,2,0,1,obfc1,obbc1)
  1275.              CALL CtrBox(1,"PowerBASIC")
  1276.              CALL CtrBox(2,"By: Robert Zale")
  1277.              CALL MakeBox(6,9,2,2,ofc2,obc2,0,0,1,obfc2,obbc2)
  1278.              CALL MakeBox(8,1,4,20,ofc3,obc3,2,1,0,obfc3,obbc3)
  1279.              CALL CtrBox(1,"Distributed by:")
  1280.              CALL CtrBox(2,"Spectra Publishing")
  1281.              CALL MakeBox(12,4,2,2,ofc2,obc2,0,0,1,obfc2,obbc2)
  1282.              CALL MakeBox(12,16,2,2,ofc2,obc2,0,0,1,obfc2,obbc2)
  1283.              CALL MakeBox(14,1,4,20,ofc4,obc4,2,1,0,obfc4,obbc4)
  1284.              CALL CtrBox(1,"PBWindows")
  1285.              CALL CtrBox(2,"By: Barry Erick")
  1286.              CALL BoxTitle(5,"Press any key",-1,-1)
  1287.              CALL MinorPause(6,CHR$(255))
  1288. ' end case 1
  1289.         CASE 2
  1290. 'make 1 windows
  1291.              CALL MakeBox(2,19,6,22,ofc5,obc5,2,0,1,obfc5,obbc5)
  1292.              CALL CtrBox(1,"DOS Version :"+DosVersion$)
  1293.              CALL CtrBox(2,"Video Mode is "+ColorOrMono$)
  1294.          CALL CtrBox(3,"Memory: " + Memory$)
  1295.          j$ = StR$(WhatCpu%)
  1296.          CALL CtrBox(4,"The CPU is a "+MID$(j$,2))
  1297.              CALL BoxTitle(5,"Press any key",-1,-1)
  1298.              CALL MinorPause(1,CHR$(255))
  1299. 'end case 2
  1300.         CASE 3
  1301. ' make one window
  1302.              CALL MakeBox(2,37,4,22,ofc1,obc1,2,0,0,-1,-1)
  1303.              CALL CtrBox(1,LEFT$(TIME$,5)+" ")
  1304.              CALL CtrBox(2,Weekday$+" "+Month$+" "+Day$+","+Year$)
  1305.              CALL BoxTitle(5,"Press any key",-1,-1)
  1306.              CALL MinorPause(1,CHR$(255))
  1307.  END SELECT
  1308.  IF LEN(KeyHit$) = 2 THEN
  1309.     SELECT CASE ASC(MID$(KeyHit$,2,1))
  1310.            CASE 75,77
  1311.                 NewPlace = %True
  1312.            CASE ELSE
  1313.                 NewPlace = %False
  1314.                 KeyHit$=""
  1315.     END SELECT
  1316.  ELSE
  1317.     NewPlace = 0
  1318.     KeyHit$ = ""
  1319.  END IF
  1320. END SUB
  1321.  
  1322. '[******************]
  1323.  
  1324.  FUNCTION DOSVersion$
  1325.  REG 1,&H30*256
  1326.  CALL INTERRUPT &H21
  1327.  al = REG(1) MOD 256
  1328.  ah = REG(1) \ 256
  1329.  al$ = STR$(al)
  1330.  ah$ = STR$(ah)
  1331.  DosVersion$ = al$+"."+MID$(ah$,2,2)
  1332.  END FUNCTION
  1333.  
  1334. '[******************]
  1335.  
  1336.  Function ColorOrMono$
  1337.  IF isColr% THEN
  1338.     ColorOrMono$ = "Color"
  1339.  ELSE
  1340.     ColorOrMono$ = "Mono"
  1341.  END IF
  1342.  END FUNCTION
  1343.  
  1344. '[******************]
  1345. '[******************]
  1346.  Function Memory$
  1347.  CALL INTERRUPT &H12
  1348.  AX& = REG(1)
  1349.  Memory$ = MID$(STR$(AX&),2)+"k"
  1350.  END FUNCTION
  1351.  
  1352.  
  1353. '[******************]
  1354.  
  1355.  
  1356. $SEGMENT
  1357.  
  1358. ' For the demo, have EnglishNumbers for the title areas
  1359.  DIM num$(12)
  1360.  RESTORE Englishnumbers
  1361.  FOR x% = 1 TO 12
  1362.      READ num$(x%)
  1363.  NEXT
  1364.  
  1365. ' use the users background for the demo
  1366.  CLS
  1367.  CALL Date
  1368.  COLOR %white,%black
  1369.  CALL Screen1(0)
  1370. 'make menu list
  1371.  LastMi% = 1
  1372.  AutoIt% = %False
  1373.  NoNoise% = %True  'PbWindow.pbu makes this false when started, but
  1374. ' let's keep it quiet here to start
  1375.  DO
  1376.      IF mlist$(1) <> "Scroll Demo" THEN
  1377.         mlist$(1) = "Scroll Demo"
  1378.         mlist$(2) = "Window Demo"
  1379.         mlist$(3) = "Frames Demo"
  1380.         mlist$(4) = "Shadows Demo"
  1381.         mlist$(5) = "Title Demo"
  1382.         mlist$(6) = "Menu Demo"
  1383.         mlist$(7) = "Noise"
  1384.         mlist$(8) = "Recolor Demo"
  1385.         mlist$(12) = "Quit"
  1386.         mlist$(13) = ""
  1387.         mlist$(9) = "Zoom"
  1388.         mlist$(10) = "Horiz Menu"
  1389.         mlist$(11) = "About"
  1390.         snu% = LastMi%
  1391.      ELSE
  1392.         snu% = lastmi%
  1393.      END IF
  1394.      IF wpt>0 THEN
  1395.         DO UNTIL wpt% = 1
  1396.             CALL Removebox
  1397.         LOOP
  1398.      END IF
  1399.      IF wpt% = 0 THEN
  1400.         IF IsColr% THEN
  1401.            CALL MakeBox(2,2,14,22,%yellow,%blue,1,1,0,%blue,%white)
  1402.         ELSE
  1403.            CALL MakeBox(2,2,14,22,%white,%black,1,1,0,%black,%white)
  1404.         END IF
  1405.         CALL Boxtitle(2,"Menu",-1,-1)
  1406.         CALL Boxtitle(5,"Select & hit Enter",-1,-1)
  1407.      END IF
  1408.      IF NOT Zoom THEN
  1409.         Mlist$(9)= "Zoom Off"
  1410.      ELSE
  1411.         MList$(9) = "Zoom On "
  1412.      END IF
  1413.      IF NOT NoNoise% THEN
  1414.         Mlist$(7) = "Noise On "
  1415.      ELSE
  1416.         Mlist$(7) = "Noise Off"
  1417.      END IF
  1418.      AutoRun% = %True
  1419.      IF IsColr% THEN
  1420.         CALL Buildmenu(mitem%,snu%,-1,-1,15,-1,4,3,1,mlist$(),AutoRun%,-1)
  1421.      ELSE
  1422.         CALL Buildmenu(mitem%,snu%,-1,-1,15,0,0,15,2,mlist$(),AutoRun%,-1)
  1423.      END IF
  1424. 'AutoRun% is a two way street. On the Call, we sent the
  1425. 'timeout value we wanted. Returned is the state of having returned
  1426. 'automatically, or not, %True says we did, %False says we didn't
  1427.      IF AutoRun%  THEN AutoIt% = %True ELSE AutoIt% = %False
  1428.      IF AutoIt% THEN
  1429.         AutoBuildTime% = 5'sure.. we hit each time, but lets speed it up
  1430.         AutoFudge% = 0
  1431.      ELSE
  1432.         AutoBuildTime% = ModifiedAutoBuildTime%
  1433.         AutoFudge% = ModifiedAutoFudge%
  1434.      END IF
  1435.      SELECT CASE mitem%
  1436.             CASE 1
  1437.                  CALL Screen2'scroll demo
  1438.                  LastMi% = mitem%
  1439.             CASE 2
  1440.                  CALL Screen3'window demo
  1441.                  LastMi% = mitem%
  1442.             CASE 3
  1443.                  CALL Screen4'frame demo
  1444.                  CALL Screen5
  1445.                  CALL Screen5a
  1446.                  LastMi% = mitem%
  1447.             CASE 4
  1448.                  CALL Screen6'shadow demo
  1449.                  CALL Screen7
  1450.                  LastMi% = mitem%
  1451.             CASE 5
  1452.                  CALL Screen8'title demo
  1453.                  LastMi% = mitem%
  1454.             CASE 6
  1455.                  LastMi% = mitem%
  1456.                  CALL Screen9'menu demo
  1457.             CASE 7
  1458.                  NoNoise% = NOT NoNoise%
  1459.                  IF NOT NoNoise% THEN
  1460.                     CALL PrtBox(7,10,"On ")
  1461.                  ELSE
  1462.                     CALL PrtBox(7,10,"Off")
  1463.                  END IF
  1464.                  CALL Screen3'window to sound noise or not
  1465.                  LastMi% = mitem%
  1466.             CASE 8
  1467.                  CALL Screen10'recolor
  1468.                  LastMi% = mitem%
  1469.             CASE 12
  1470.                  CALL Removebox'quit
  1471.                  IF wpt% >0 THEN'remove all the windows
  1472.                     DO
  1473.                         CALL Removebox
  1474.                     LOOP UNTIL wpt% = 0
  1475.                  END IF
  1476.                  CALL Screen1(-1)
  1477.                  END
  1478.                  LastMi% = mitem%
  1479.             CASE 9
  1480.                  Zoom = NOT Zoom
  1481.                  IF NOT Zoom THEN
  1482.                     CALL PrtBox(9,9,"Off")
  1483.                  ELSE
  1484.                     CALL PrtBox(9,9,"On ")
  1485.                  END IF
  1486.                  CALL Screen4
  1487.                  CALL Screen5
  1488.                  CALL Screen5a
  1489.                  LastMi% = mitem%
  1490.             CASE 10
  1491. 'Horiz Menu
  1492.                  Mlist$(1)="Nothing"' to allow redoing it
  1493.                  DO UNTIL Wpt% = 0
  1494.                      CALL RemoveBox'kill menu
  1495.                  LOOP
  1496.                  CALL Screen11
  1497.                  Lastmi% = mitem%
  1498.             CASE 11
  1499.                  MList$(1) = "Nothing"
  1500.                  DO UNTIL Wpt% = 0
  1501.                      CALL RemoveBox
  1502.                  LOOP
  1503.                  About = %True
  1504.                  CALL Screen1(0)
  1505.                  About = %False
  1506.                  LastMi% = MItem%
  1507.      END SELECT
  1508.      IF AutoIt% THEN
  1509.         INCR LastMi%
  1510.         IF LastMi% > 11 THEN LastMi% = 1
  1511.      END IF
  1512.  LOOP
  1513.  END
  1514.  
  1515. '[******************]
  1516.  
  1517.  
  1518. Englishnumbers:
  1519. DATA "One ", "Two ", "Three ", "Four", "Five", "Six ", "Seven ", "Eight "
  1520. DATA "Nine", "Ten ", "Eleven", "Twelve"
  1521.  
  1522. END