home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / pb / library5 / pbwndo.exe / PWDEMO.BAS < prev    next >
Encoding:
BASIC Source File  |  1990-03-26  |  39.9 KB  |  1,423 lines

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