home *** CD-ROM | disk | FTP | other *** search
/ Windoware / WINDOWARE_1_6.iso / source / pwez41 / wind_rez.doc < prev   
Text File  |  1991-02-01  |  162KB  |  4,422 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                                 WINDOWS R-E-Z
  27.                                 VER. 4.10
  28.  
  29.  
  30.                                 CONNECT Software
  31.                                 6192 Fawn Meadow
  32.                                 Farmington, NY   14425
  33.  
  34.                                 Richard Magnanti
  35.                                 (716) 924-3439
  36.  
  37.                                 CPS:    71020,2040
  38.                                 GENIE:  R.MAGNANTI
  39.                                 DELPHI: MAGNANTI
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                                COPYRIGHT (c) 1988 - 1991 BY:
  57.                                CONNECT Software
  58.                                ALL RIGHTS RESERVED
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                     CONTENTS
  74.  
  75.           Differences in versions of WINDOWS R-E-Z ----------------- 1
  76.  
  77.           Important notes for BASIC 7.0/7.1 ( PDS ) users.-------- 2-3
  78.  
  79.           General overview ( list of procedures included ) ------- 4-6
  80.  
  81.           System and programming requirements ---------------------- 6
  82.  
  83.           Windowing routines ------------------------------------ 7-15
  84.                    The Active Window ------------------------------- 7
  85.              1.00  SETWIND --------------------------------------- 7-8
  86.                    SETWIND examples ------------------------------ 8-9
  87.              1.01  MAKEWIND ------------------------------------- 9-11
  88.              1.02  CHNGWIND --------------------------------------- 11
  89.              1.03  PRINTW -------------------------------------- 11-12
  90.              1.04  SAVEWIND --------------------------------------- 12
  91.              1.05  RESAVE -------------------------------------- 12-13
  92.              1.06  RSTRWIND --------------------------------------- 13
  93.              1.07  DELWIND ---------------------------------------- 14
  94.              1.08  CLRWIND ---------------------------------------- 14
  95.              1.09  NEWCOLOR --------------------------------------- 14
  96.              1.10  LINEW --------------------------------------- 14-15
  97.              1.11  WINDSTATUS ------------------------------------- 15
  98.  
  99.           Pulldown windows ------------------------------------- 16-19
  100.              2.00  SETPULL ------------------------------------- 16-17
  101.                    SETPULL example ----------------------------- 17-18
  102.              2.01  PULLDOWN ------------------------------------ 18-19
  103.              2.02  CHNGPULL --------------------------------------- 19
  104.  
  105.           Scroll windows --------------------------------------- 20-28
  106.              3.00  SCRLWIND ------------------------------------ 20-23
  107.                    SCRLWIND example ( Auto-exit ) -------------- 23-24
  108.                    SCRLWIND example ( Multiple scroll windows )- 24-27
  109.              3.01  MARKED% ------------------------------------- 27-28
  110.  
  111.           Get answer routine ----------------------------------- 29-30
  112.              4.00  GETANS -------------------------------------- 29-30
  113.  
  114.           Input routines --------------------------------------- 31-40
  115.              5.00  INPTWIND ------------------------------------ 31-33
  116.              5.01  SETINPT ------------------------------------- 33-35
  117.                    SETINPT example ----------------------------- 35-36
  118.              5.02  MULTINPT ------------------------------------ 36-39
  119.                    Editing features for input routines ------------ 40
  120.  
  121.           Directory routines ----------------------------------- 41-44
  122.              6.00  GETDISK ---------------------------------------- 41
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.      Copyright (c) 1988 - 1991 By: CONNECT Software  All Rights reserved.
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.              6.01  FINDPATH --------------------------------------- 41
  140.              6.02  SETDISK ------------------------------------- 41-42
  141.              6.03  DISKSIZE --------------------------------------- 42
  142.              6.04  FINDDIR ------------------------------------- 42-44
  143.                    A directory scroll window ( example ) ------- 45-46
  144.  
  145.           Keyboard and Mouse routines -------------------------- 47-48
  146.              7.00  KEYMOUSE% -------------------------------------- 47
  147.                    KEYMOUSE% example --------------------------- 47-48
  148.              7.01  MBUTTONS --------------------------------------- 48
  149.              7.02  MOUSEON ---------------------------------------- 48
  150.  
  151.           Sound Routine ------------------------------------------- 48
  152.              8.00  DOSOUND ---------------------------------------- 48
  153.  
  154.           Program format --------------------------------------- 49-52
  155.  
  156.           Making a customized library ----------------------------- 53
  157.  
  158.           Description of files --------------------------------- 54-55
  159.  
  160.           Errors ----------------------------------------------- 56-59
  161.  
  162.           Appendix --------------------------------------------- 60-64
  163.              Color attribute chart -------------------------------- 60
  164.              Multi-field code chart ------------------------------- 61
  165.              Border designation chart ----------------------------- 62
  166.              Keymouse code values --------------------------------- 63
  167.  
  168.           Restrictions and disclaimer ----------------------------- 64
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.      Copyright (c) 1988 - 1991 By: CONNECT Software  All Rights reserved.
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                             ***************************
  206.                             *  NOTE ------ READ THIS! *
  207.                             ***************************
  208.  
  209.               The information in this documentation refers to the
  210.           enhanced version of WINDOWS R-E-Z.  Differences between the
  211.           QuickBasic ( 4.00, 4.00b and 4.50 ) and the BASIC 7.+ (PDS)
  212.           versions are detailed.  The documentation can be used for the
  213.           unenhanced versions with the following exceptions.
  214.  
  215.  
  216.               1. MULTI-FIELD INPUT SCREENS - A maximum of 2 input
  217.           screens with a maximum of 25 fields per screen are available
  218.           in the unenhanced version.  This compares to 10 multi-field
  219.           screens with up to 100 fields each, in the enhanced version.
  220.  
  221.               2. MEMORY - The code in the unenhanced libraries is not
  222.           modular.  Therefore executable programs made with the unen-
  223.           hanced libraries will contain all of the code even though
  224.           all of the procedures are not used.  This will substantially
  225.           increase the length of any executable file and program.
  226.               With the enhanced versions of WINDOWS R-E-Z, it is not
  227.           necessary to link modules to executable programs if routines
  228.           in a module are not used by the program.  Much smaller ex-
  229.           ecutable programs are consequently possible.
  230.               An additional library is included in the enhanced
  231.           versions which does not contain error checking or window
  232.           status capability.  This library can be used after the
  233.           program is de-bugged and also represents an opportunity for
  234.           considerable memory reduction.
  235.  
  236.               3. The BASIC 7.0/7.1 unenhanced version does not allow
  237.           the use of unnamed ( blank ) COMMON blocks.  The enhanced
  238.           version has provisions for the use of same.
  239.  
  240.               4. The section labeled "MAKING A CUSTOMIZED LIBRARY"
  241.           refers to the enhanced version of WINDOWS R-E-Z.
  242.  
  243.  
  244.           **********************************************************
  245.           **  For information on obtaining the enhanced version   **
  246.           **  of WINDOWS R-E-Z see the file ORDER.ME.             **
  247.           **********************************************************
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                   1                                   
  262.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                Important notes for BASIC 7.0/7.1 ( PDS ) users.
  272.  
  273.  
  274.           ENHANCED AND UNENHANCED VERSIONS:
  275.  
  276.           The /Ea option may be used when loading QBX.  This allows
  277.           the use of expanded memory.
  278.  
  279.           Window memory resides in a separate segment of string space
  280.           reserved for strings placed in unnamed ( blank ) COMMON
  281.           blocks.  DO NOT USE BLANK COMMON BLOCKS IN YOUR PROGRAM.
  282.  
  283.           EXAMPLE: COMMON SHARED A$                ' NOT PERMITTED
  284.                    COMMON SHARED /BLOCKNAME/ A$    ' PERMITTED
  285.  
  286.           Maximum window memory is 64k bytes.  Calls to MAKEWIND or
  287.           SAVEWIND requesting window memory in excess of 64k bytes
  288.           will result in an "Out of string space" error message.  As
  289.           64k represents sixteen full display windows (80 column mode)
  290.           this limitation should not be restrictive.
  291.  
  292.           The use of far strings is required.  This is the default for
  293.           programs compiled from the QBX environment.   If the source
  294.           code is compiled on the command line the /Fs option must be
  295.           used with BC.
  296.  
  297.  
  298.           ENHANCED VERSION ONLY:
  299.  
  300.           An additional object file PDSMEM70/71.OBJ is included which
  301.           allows the use of unnamed (blank) COMMON blocks. It must re-
  302.           place the object file PDSMEM.OBJ which is included in the
  303.           libraries.  Window memory will share main module string
  304.           space after this change is made.  To make this change;
  305.  
  306.           1. Make new library files. ( Save old library files! )
  307.  
  308.           LIB PDSALL70.LIB-PDSMEM.OBJ+PDSMEM70.OBJ;     ( BASIC 7.0 )
  309.           LIB PDSNER70.LIB-PDSMEM.OBJ+PDSMEM70.OBJ;     ( BASIC 7.0 )
  310.  
  311.           LIB PDSALL71.LIB-PDSMEM.OBJ+PDSMEM71.OBJ;     ( BASIC 7.1 )
  312.           LIB PDSNER71.LIB-PDSMEM.OBJ+PDSMEM71.OBJ;     ( BASIC 7.1 )
  313.  
  314.           2. Make new quick-libraries. ( Save old quick-libraries! )
  315.  
  316.           LINK/Q PDSALL70.LIB,PDSALL70.QLB,,QBXQLB.LIB; ( BASIC 7.0 )
  317.           LINK/Q PDSNER70.LIB,PDSNER70.QLB,,QBXQLB.LIB; ( BASIC 7.0 )
  318.  
  319.           LINK/Q PDSALL71.LIB,PDSALL71.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
  320.           LINK/Q PDSNER71.LIB,PDSNER71.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                   2                                   
  328.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.           UNENHANCED VERSION ONLY:
  338.  
  339.           The library in the unenhanced, BASIC 7.0/7.1, version of
  340.           WINDOWS R-E-Z  was made using BASIC 7.1.  If you are using
  341.           BASIC 7.0 the following message will appear when making
  342.           executable programs from within the QBX environment.
  343.  
  344.           LINK WARNING L4051: BRT71EFR.LIB: CANNOT FIND LIBRARY
  345.           Enter new file spec:
  346.  
  347.           Press ENTER.  The file, BRT71EFR.LIB, is not required.
  348.  
  349.           The enhanced version of WINDOWS R-E-Z has libraries avail-
  350.           able for BASIC 7.0 and BASIC 7.1.
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                   3                                   
  394.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                             *** GENERAL OVERVIEW ***
  404.  
  405.               WINDOWS R-E-Z is a collection of QuickBASIC and assembly
  406.           routines which provide users of QuickBASIC ver. 4.00+ and
  407.           BASIC 7.0+ ( PDS ) with a complete window management system.
  408.           With WINDOWS R-E-Z users can make, save, restore, and delete
  409.           up to twenty windows.  The memory used to save windowed
  410.           areas is dynamically allocated and outside of basic's normal
  411.           data storage area leaving more room for the basic programs
  412.           data.  Windows are assigned a number from zero to twenty.
  413.  
  414.               "INPUT WINDOWS" and "MULTI-FIELD INPUT" routines are
  415.           also provided.  "INPUT WINDOWS" provide a convenient means
  416.           to prompt for, and receive an input.  "MULTI-FIELD INPUT"
  417.           allows users to define up to 10 input screens, each having up
  418.           to 100 input fields.  Numerous options are included for
  419.           input fields.
  420.  
  421.               WINDOWS R-E-Z provides users the ability to incorporate
  422.           "PULLDOWN WINDOWS", emulating those used in the QuickBASIC
  423.           programming environment, in their programs.
  424.  
  425.               Directory routines find the default drive and path, disk
  426.           size and free space, and directory listing for any path.
  427.           File size, date, time, and attributes can also be found.
  428.  
  429.               Several other routines are included which allow the use
  430.           of "GET ANSWER WINDOWS" and "SCROLL WINDOWS".   The ability
  431.           to read KEYBOARD and MOUSE input is also provided with
  432.           WINDOWS R-E-Z.
  433.  
  434.               All of the routines require a minimal amount of initial-
  435.           ization and the resulting programs present a professional
  436.           appearance.
  437.  
  438.               Unlike many other basic "add-ons", WINDOWS R-E-Z
  439.           provides extensive error detection and reporting.
  440.  
  441.           Procedures included:
  442.  
  443.             SETWIND -------- Set up routine for windowing procedures.
  444.  
  445.             MAKEWIND ------- Makes a window.  Saves windowed area to
  446.                              window memory.  The window becomes the
  447.                              "active window".
  448.  
  449.             SAVEWIND ------- Saves a screen area to window memory.
  450.  
  451.             RESAVE --------- Saves the active window.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                   4                                   
  460.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.             RSTRWIND ------- Restores a window area to the display.
  470.  
  471.             DELWIND -------- Deletes a window area from window memory.
  472.  
  473.             CHNGWIND ------- Changes the active window to another
  474.                              window.
  475.  
  476.             NEWCOLOR ------- Changes the print-to color of the active
  477.                              window for text printed by PRINTW.
  478.                              The print-to color is used by CLRWIND to
  479.                              clear the active window's interior.
  480.  
  481.             CLRWIND -------- Clears the interior of the active window.
  482.  
  483.             PRINTW --------- Prints text in the active window using
  484.                              the window's "print-to" color.
  485.  
  486.             LINEW ---------- Prints a line in the active window using
  487.                              the window's "print-to" color.
  488.  
  489.             SCRLWIND ------- Places a scrollable list in the active
  490.                              window.
  491.  
  492.             MARKED% -------- (FUNCTION) Returns position of marked
  493.                              items after a call to SCRLWIND.
  494.  
  495.             WINDSTATUS ----- Reports window memory status.
  496.  
  497.             SETPULL -------- Set up routine for pulldown windows.
  498.  
  499.             PULLDOWN ------- Makes pulldown windows.
  500.  
  501.             CHNGPULL ------- Changes the color of, and disables or
  502.                              enables an item in a pulldown window.
  503.  
  504.             INPTWIND ------- Makes an input field with an optional
  505.                              window.  The field can be edited by
  506.                              the user.
  507.  
  508.             SETINPT -------- Set up routine for multi-field input
  509.                              screens.
  510.  
  511.             MULTINPT ------- Places input fields on the screen as
  512.                              defined by a previous call to SETINPT.
  513.  
  514.             GETANS --------- Makes a get answer window or single line
  515.                              prompt.  Waits for a single key response.
  516.  
  517.             DOSOUND -------- Produces sound determined by SETWIND.
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                   5                                   
  526.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.             GETDISK -------- Returns the default disk drive.
  536.  
  537.             SETDISK -------- Sets the default disk drive.
  538.  
  539.             FINDPATH ------- Returns the default path for any drive
  540.                              ( current directory ).
  541.  
  542.             DISKSIZE ------- Returns disk size and free space.
  543.  
  544.             FINDDIR -------- Returns the directory of any drive or path
  545.                              in a string array.
  546.  
  547.             KEYMOUSE% ------ (FUNCTION) Waits for keyboard or mouse
  548.                              input, or mouse movement.  Returns a code
  549.                              for the key pressed or mouse movement.
  550.  
  551.             MBUTTONS ------- Redefines the mouse buttons.
  552.  
  553.             MOUSEON -------- Turns the mouse on, off, or disables
  554.                              movement detection.
  555.  
  556.             --------------------------------------------------------
  557.  
  558.                   ***  SYSTEM AND PROGRAMMING REQUIREMENTS ***
  559.  
  560.             COMPUTER:
  561.                IBM PC (XT or AT) or compatible computer.  One disk drive.
  562.  
  563.             VIDEO ADAPTER CARD:
  564.                MONO, CGA, EGA or VGA emulating CGA.
  565.  
  566.             PROGRAMMING LANGUAGE:
  567.                For the QB4.+ version;
  568.  
  569.                    QuickBASIC version 4.00 or greater.
  570.                     - Text mode
  571.  
  572.                For the BASIC 7.+ (PDS) version;
  573.  
  574.                    BASIC 7.0  or greater.
  575.                    - Text mode
  576.  
  577.                    - Requires use of "far strings". This is the default
  578.                      if executable programs are produced from within
  579.                      QBX.  If modules are compiled using BC on the command
  580.                      line ( outside of the QBX environment ) the /Fs option
  581.                      must be used.
  582.  
  583.             DOS: Version 2.1 or higher.
  584.  
  585.             -------------------------------------------------------
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                   6                                   
  592.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                             USING WINDOWS R-E-Z
  602.  
  603.          THE ACTIVE WINDOW
  604.  
  605.          When a window is defined ( made ) the number assiged to it
  606.          by the programmer represents the area covered by the window.
  607.          The area is restored or deleted via it's "number".  Up to 20
  608.          window areas can be saved.  The memory used to save the
  609.          window areas is automatically managed by WINDOWS R-E-Z.
  610.  
  611.          Any time a window is made it becomes the "active" window. The
  612.          active window is used by the following routines.
  613.  
  614.               PRINTW --- Prints text in the active window.
  615.               LINEW ---- Prints a line in the active window.
  616.               SCRLWIND - Places a scrollable list in the active
  617.                          window.
  618.               CLRWIND -- Clears all text from the interior of the
  619.                          active window.
  620.               RESAVE  -- Saves the active window and any text in the
  621.                          active window.
  622.               NEWCOLOR - Changes the "print-to" color of the active
  623.                          window.
  624.  
  625.  
  626.          1.00 SETWIND (FAST%, SND%, SHAD%, NOHIFLAG%, ISDOT%, ISARROW%)
  627.  
  628.               Description:   SETWIND must be called at least once in
  629.               any program using the routines in WINDOWS-R-E-Z, prior
  630.               to calling any windowing routines.  This procedure init-
  631.               ializes window memory.  It also sets the default window-
  632.               ing speed, sound, and window shadow color.  In addition
  633.               it determines how the pulldown window and scroll window
  634.               routines display high intensity characters and the
  635.               direction arrow.
  636.  
  637.               The first call to SETWIND initializes window memory and
  638.               sets the default parameters.  Subsequent calls to
  639.               SETWIND will not affect window memory but can be used
  640.               to change the default parameters.
  641.  
  642.               Arguments:      FAST% is used to allow "fast" windowing
  643.               if a CGA video card, or emulation, is detected.  IF
  644.               FAST% = 0  window routines will be slower on computers
  645.               with CGA.  If FAST%  = 1 the window routines will be
  646.               "fast" on computers with CGA.  This may, however, cause
  647.               "snow" with certain CGA cards.  If a monochrome card is
  648.               detected all windowing is "fast" and FAST% has no
  649.               effect.
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                   7                                   
  658.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.                                SND% determines which sound will be
  668.               generated by the routines.   If SND% = 1 a "CLICK" sound
  669.               will be generated.  If SND% = 2 will a "BEEP" sound will
  670.               be produced.  Any other value produces no sound.
  671.  
  672.                                SHAD% sets the color for window shad-
  673.               ows.  See the color attribute chart for details.  Set-
  674.               ting SHAD% to 7 works well for monochrome display while
  675.               setting SHAD% to 8 works well for color displays.
  676.  
  677.                                NOHIFLAG% tells the pulldown and scroll
  678.               window routines how to display high intensity "key"
  679.               characters.  If NOHIFLAG% = 0 and the key character's
  680.               color is set to a high intensity it is displayed as high
  681.               intensity.  If NOHIFLAG% = 1 high intensity "key"
  682.               characters are displayed in reverse video.  This is
  683.               appropriate for LCD displays which can not display high
  684.               intensity characters.   NOHIFLAG% affects "key" char-
  685.               acters only.  See PULLDOWN and SCRLWIND descriptions.
  686.  
  687.                                ISDOT% sets a period or comma for
  688.               the decimal designator.  If ISDOT% = 1 the decimal
  689.               designator is a period.  If ISDOT% <> 1 the decimal
  690.               designator is a comma.  This is appropriate for some
  691.               foreign users.
  692.  
  693.                                ISARROW% tells the pulldown and scroll
  694.               window routines to display or not display the direction
  695.               arrow on the right side of the windows.  If ISARROW% = 1
  696.               the arrow will be displayed.  If ISARROW% = 0 the arrow
  697.               will not be displayed.
  698.  
  699.               NOTE: If a CLEAR statement is executed by the program
  700.               all window memory is lost.  Any window areas saved in
  701.               window memory are lost.  SETWIND must be called again
  702.               to re-initialize window memory after executing a CLEAR
  703.               statement.
  704.  
  705.          ------------------------------------------------------------
  706.          Examples of a call to SETWIND.  Use the first example if
  707.          SETWIND will be called only once in the program.  Use the
  708.          second example if SETWIND may be called several times in the
  709.          program.   In example two the call to SETWIND is placed in a
  710.          sub-routine.  This is more memory efficient than calling
  711.          SETWIND several times in the program.
  712.          ------------------------------------------------------------
  713.          Example one:  This is the easier method but the ability to
  714.          change parameters based on the user's requirements is
  715.          inhibited.
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                   8                                   
  724.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.          This call sets windowing and print speed to fast, sound to
  734.          click, window shadow color to 7, no hi-intensity to no,
  735.          decimal deignator to a period, and scroll bar direction arrow
  736.          to on.
  737.  
  738.          CALL SETWIND(1, 1, 7, 0, 1, 1)
  739.  
  740.          ------------------------------------------------------------
  741.          Example two: This method provides the ability to easily
  742.          change the parameters.  In this example the sound starts out
  743.          as a "click" but is changed to a "beep" by the program
  744.  
  745.          FAST% = 1: SND% = 1: SHADCOL% = 7
  746.          NOHIFLAG% = 0: ISDOT% = 1: ISARROW% = 1
  747.  
  748.          GOSUB SETITUP       ' Initial call to SETWIND
  749.  
  750.          'program
  751.          'program
  752.  
  753.          'Now turn the sound to "beep".
  754.  
  755.          SND% = 2
  756.          GOSUB SETITUP       ' 2nd call to SETWIND
  757.  
  758.          'program
  759.          'program
  760.  
  761.          CALL DOSOUND
  762.          END
  763.  
  764.         SETITUP:
  765.         CALL SETWIND(FAST%,SND%,SHADCOL%,NOHIFLAG%,ISDOT%,ISARROW%)
  766.         RETURN
  767.  
  768.         -------------------------------------------------------------
  769.  
  770.  
  771.          1.01 MAKEWIND (W%, LABEL$, TR%, LC%, WIDE%, NR%, ATTR%, BORBER%)
  772.  
  773.               Description:   Makes a window.  May also save a window-
  774.               ed area to window memory.  The window becomes the active
  775.               window.   Calls to PRINTW, LINEW, SCRLWIND, CLRWIND,
  776.               RESAVE, and NEWCOLOR refer to the active window.
  777.  
  778.               Arguments:   W% is the window number and must equal 0 to
  779.               20.  If W% = 0 the area under the window is not saved.
  780.               A window is simply made.  If W% is from 1 to 20 the area
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                   9                                   
  790.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.               under the window is saved and may be restored at a later
  799.               time via a call to RSTRWIND.  If W% is the number of a
  800.               window area previously saved by MAKEWIND or SAVEWIND an
  801.               error is reported.
  802.  
  803.                            LABEL$ is the text printed on the top
  804.               border or in the title box (see BORDER%) of the window.
  805.               By default the print starts on the second column.  If
  806.               the left character of LABEL$ ="@" the text will be
  807.               centered.  If LABEL$ is too long it will be truncated to
  808.               fit on the top border or in the title box.
  809.  
  810.                            TR% is the top row of the window.  If TR% =
  811.               100 the window will be centered from top to bottom.  TR%
  812.               can range from 1 to 23 or may equal 100.  Any other
  813.               value for TR% will result in a error.
  814.  
  815.                             LC% is the left column position of the win-
  816.               dow. If LC% = 100 the window will be centered from left
  817.               to right.  LC% can range from 1 to 78 if the display
  818.               width is 80 or from 1 to 38 if the display width is 40.
  819.  
  820.                            WIDE% is the window's width.  WIDE% must be
  821.               greater than 2.  WIDE% + LC% -1 must not be greater than
  822.               the displays width ( 40 or 80 ).
  823.  
  824.                            NR% is the number of rows in the window and
  825.               must be greater than 2.  NR% + TR% must not be greater
  826.               than 26.  If NR% is less than 5 a window title box is
  827.               not permitted.
  828.  
  829.                            ATTR% is the windows colors and may be in
  830.               the range of 0 to 255.  The foreground ( window's label
  831.               and border ) color equals ATTR% MOD 16.  The background
  832.               color equals INT( ATTR% / 16 ). If the background color
  833.               is greater than 7 the foreground flashes and the back-
  834.               ground color equals background color - 8. If the fore-
  835.               ground and background colors are the same the border and
  836.               label will not be visible. ( SEE THE COLOR ATTRIBUTE
  837.               CHART.)  ATTR% becomes the print-to color for window W%.
  838.  
  839.                            BORDER% sets the window's border and shadow
  840.               and can be up to 3 digits in length.
  841.  
  842.               DIGIT    =    #3  #2  #1
  843.               Example   =    1   1   1   ( 111 )
  844.  
  845.               Digit #1 sets the border.
  846.  
  847.                      0 = No border
  848.                      1 = Single line border
  849.                      2 = Double line border
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                   10                                  
  856.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.               Digit #2 sets the shadow.
  866.  
  867.                      0 = No shadow
  868.                      1 = Right/Bottom shadow
  869.                      2 = Left/Bottom shadow
  870.                      3 = Left/Top shadow
  871.                      4 = Right/top Shadow
  872.  
  873.                Digit #3 set the title box.
  874.  
  875.                      0 = No title box
  876.                      1 = title box
  877.  
  878.               The example (111) has a 1 for each digit.  The window
  879.               will has a single lined border, a shadow on the right
  880.               and bottom and a title box
  881.  
  882.               NOTE:  If BORDER% is 100 or greater and the number of
  883.               rows (NR%) is less than 5 title boxes are not permitted.
  884.               ( SEE THE BORDER DESIGNATION CHART IN THE APPENDIX FOR
  885.               FURTHER DETAILS.)
  886.  
  887.  
  888.          1.02 CHNGWIND (W%)
  889.  
  890.               Description:  Makes window (W%) the active window.
  891.               W% must represent a window area in window memory.
  892.  
  893.               Argument:   W% is the window number.  It must range from
  894.               0 to 20.  If W% does not represent a window saved by a
  895.               previous call to MAKEWIND, CHNGWIND reports an error.
  896.  
  897.               NOTE:  W% CAN NOT REPRESENT A WINDOW SAVED BY "SAVEWIND".
  898.               IT MUST REPRESENT A WINDOW SAVED BY "MAKEWIND".
  899.  
  900.  
  901.          1.03 PRINTW (TEXT$, R%, LC%)
  902.  
  903.               Description:   Prints text to the active window.  Care
  904.               must be used to assure the active window is visible
  905.               as PRINTW will print predicated on the coordinates of
  906.               the active window regardless of it's visibility.  It is
  907.               advisable, therefore, to print to a window immediately
  908.               after it is made the active window. The text's color
  909.               will be the print-to color of the active window.  If
  910.               no window is active when PRINTW is called an error will
  911.               be reported.
  912.  
  913.               Arguments:   TEXT$ is the text to be printed.
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.                                   11                                  
  922.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.                            R% is the row in the window were the text
  932.               will print .  If R%=1 the text will print in the first
  933.               row below the border or title box. PRINTW may be used to
  934.               print a label in the bottom border of the window by
  935.               setting R% to the number or rows in the active window
  936.               minus 1 ( minus 3 if a title box was specified ).  An
  937.               invalid value for R% will result in a reported error.
  938.  
  939.                            LC% is the left column where TEXT$ starts
  940.               printing.  If LC%=100 the text will be centered left to
  941.               right.  IF LC% plus the length of TEXT$ is greater than
  942.               the windows width minus 2 an error will be reported.
  943.  
  944.  
  945.          1.04 SAVEWIND (W%, TR%, LC%, WIDE%, NR%)
  946.  
  947.               Description:   Saves a portion of the screen in window
  948.               memory.  This procedure is the same as MAKEWIND except
  949.               no window is made.  The area designated by the arguments
  950.               is saved.  If the number assigned to W% represents a
  951.               window area previously saved by MAKEWIND or SAVEWIND an
  952.               error is reported.  An area saved via SAVEWIND can be
  953.               "popped" to the screen at appropriate times during
  954.               program execution by RSTRWIND ( see description ). A
  955.               screen area saved by SAVEWIND DOES NOT BECOME THE
  956.               ACTIVE WINDOW.  SAVEWIND differs from RESAVE in that it
  957.               saves an area of the screen specified by it's
  958.               arguments. RESAVE saves the area of the screen as
  959.               designated by the coordinates of the active window.
  960.  
  961.               Arguments:  W% must range from 1 to 20.
  962.  
  963.                           See MAKEWIND for a description of the
  964.               remaining arguments.
  965.  
  966.  
  967.          1.05 RESAVE
  968.  
  969.               Description:   Saves the active window, it's interior,
  970.               and shadow.  As window number 0 can not be saved the
  971.               active window can not be window number 0.  If there is
  972.               no active window or window number 0 is active when
  973.               RESAVE is called an error will be reported.
  974.  
  975.               The screen area saved under the active window is removed
  976.               from window memory and replaced with the active window
  977.               and it's interior.   After complex screens are made in
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.                                   12                                  
  988.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.               the active window's interior, RSAVE can be used to save
  997.               them.   They can be restored to the screen using
  998.               RSTRWIND.  Use RESAVE immediately after a window is made
  999.               and it's interior is filled as  RESAVE will save the
  1000.               area of the screen determined by the active window's
  1001.               coordinates, even if it is not visible.
  1002.  
  1003.               Use RESAVE as follows;
  1004.  
  1005.               1. Make a window number 1 to 20 via a call to MAKEWIND.
  1006.                  This becomes the active window.
  1007.  
  1008.               2. Print in the window using PRINTW.  Additional windows
  1009.                  may also be printed in the window.  Use window number
  1010.                  0 to make the additional windows, as the screen area
  1011.                  under them need not be saved.
  1012.  
  1013.               3. Call CHNGWIND to make the window number used in step
  1014.                  1 the active window.  ( Only required if additional
  1015.                  windows were made inside the original window. )
  1016.  
  1017.               4. Call RESAVE to save active window.
  1018.  
  1019.               5. Use RSTRWIND to "pop" the window and it's interior on
  1020.                  the screen any time during program execution.
  1021.  
  1022.               6. After the window is restored to the screen it may be
  1023.                  printed in again provided it is the active window.
  1024.                  This may require a call to CHNGWIND.
  1025.  
  1026.               Arguments:   None.
  1027.  
  1028.  
  1029.          1.06 RSTRWIND (W%, DELFLAG%)
  1030.  
  1031.               Description:   Restores a window area previously saved
  1032.               by MAKEWIND, SAVEWIND or RESAVE.  The window area (W%)
  1033.               must exist in window memory or RSTRWIND does nothing.
  1034.  
  1035.               Arguments:   W% is the number ( 1 to 20 ) assigned to
  1036.               the saved window area to be restored to the screen.  The
  1037.               window area is returned to it's original coordinates.
  1038.  
  1039.                            DELFLAG% is set to zero  to keep the
  1040.               windowed area in window memory.  If the DELFLAG% is not
  1041.               zero the saved window area (W%) is deleted from window
  1042.               memory. If W% was the active window an active window
  1043.               will no longer exist.
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.                                   13                                  
  1054.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.          1.07 DELWIND (W%)
  1064.  
  1065.               Description:   Deletes a saved window area (W%) from
  1066.               window memory, if it exists in window memory.  If the
  1067.               window is the active window an active window will no
  1068.               longer exist.
  1069.  
  1070.               Argument:   W% is the window area number.
  1071.  
  1072.  
  1073.          1.08 CLRWIND
  1074.  
  1075.               Description:   Clears the interior of the active window.
  1076.               Care must be taken to assure that active window is
  1077.               visible as CLRWIND clears the area of the screen
  1078.               designated as the interior of the active window regard-
  1079.               less of the window's visibility.  The window will be
  1080.               cleared with it's print-to color.  If no window is
  1081.               active when CLRWIND is called, an error is reported.
  1082.  
  1083.               Arguments:   None
  1084.  
  1085.  
  1086.          1.09 NEWCOLOR ( ATTR% )
  1087.  
  1088.               Description:   Changes the print-to color of the active
  1089.               window.  Text printed in the window by PRINTW or lines
  1090.               printed in the window by LINEW will assume the new color
  1091.               specified by this routine.  If the active window is
  1092.               cleared via a call to CLRWIND, it's interior will be
  1093.               cleared with the color specified by NEWCOLOR.  The color
  1094.               designation will be retained and used by subsequent
  1095.               calls to PRINTW or LINEW for the window which was active
  1096.               when NEWCOLOR was called.  If no window is active when
  1097.               NEWCOLOR is called, an error is reported.
  1098.  
  1099.               Argument:   ATTR% is the new color attribute.  SEE THE
  1100.               COLOR ATTRIBUTE CHART.
  1101.  
  1102.  
  1103.          1.10 LINEW ( ROW%, TYP% )
  1104.  
  1105.               Description:   Prints, or erases a line in the active
  1106.               window.  If an active window does not exist an error is
  1107.               reported. The line will assume the print-to color of the
  1108.               active window.  As the border characters are changed
  1109.               when a line is printed, the color of the border
  1110.               characters may change also.  This will occur if the
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                   14                                  
  1120.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.               print-to color is not the same as the color of the
  1129.               border characters in the active window.
  1130.  
  1131.               Arguments:  ROW% is the row, of the interior, of the
  1132.               active window where a line will print.  If ROW% < 1 or
  1133.               ROW% greater then the number of rows in the interior of
  1134.               the active window an error will be reported.
  1135.  
  1136.                           TYP% is the type of line which will print
  1137.               and may be as follows;
  1138.  
  1139.                       TYP%               Line type
  1140.                         1                Single line
  1141.                         2                Double line
  1142.                         0                Erases a line and returns
  1143.                                          normal border characters.
  1144.                         Other values     Defaults to single line.
  1145.  
  1146.               NOTE: IF TYP% = 0 ANY TEXT ON THE LINE IN THE WINDOW,
  1147.               POSITIONED IN ROW, ROW% WILL BE ERASED.
  1148.  
  1149.  
  1150.          1.11 WINDSTATUS
  1151.  
  1152.               Description:   This is a programming tool.  Calling
  1153.               WINDSTATUS reports each window's number, top row, left
  1154.               column, width, number of rows, and attribute (color).
  1155.               The attribute refers to the original attribute specified
  1156.               by the call to MAKEWIND for each window.  If the
  1157.               attribute is "SAVED" the window area was saved by a call
  1158.               to SAVEWIND, not MAKEWIND.  WINDSTATUS also reports the
  1159.               active window and total window memory used to save
  1160.               window areas.   Window number zero does not use window
  1161.               memory as the area under it is not saved.  To use
  1162.               WINDSTATUS place a call to WINDSTATUS in the program at
  1163.               the location where it is desireable to view each windows
  1164.               parameters.  The program will terminate and must be
  1165.               restarted.  First remove the call to WINDSTATUS.
  1166.  
  1167.               Arguments:   None.
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.                                   15                                  
  1186.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.                         ***** PULLDOWN WINDOWS *****
  1196.  
  1197.          These procedures generate a maximum of 10 pulldown windows
  1198.          with a maximum of 20 items ( lines ) in each window.  The
  1199.          area covered by the pulldown windows is saved  and restored
  1200.          as the window moves from one menubar item to the next.
  1201.          Unlike the other windowing procedures pulldown windows will
  1202.          only work in the 80 column display width mode.  To select a
  1203.          menubar item the ARROW keys can be used or the first letter
  1204.          of the menubar item may be pressed.  To select an item from
  1205.          any of the pulldown windows the ARROW keys, or "KEY CHAR-
  1206.          ACTER" for the item may be pressed.  If the ARROW keys are
  1207.          used the ENTER or RETURN key must be pressed to finalize the
  1208.          selection.  If a letter is pressed, and it is found, the
  1209.          procedure is automatically exited without the need to press
  1210.          the ENTER or RETURN keys.  The ESC key always exits.
  1211.  
  1212.  
  1213.          2.00 SETPULL (BAR$, PWIND$())
  1214.  
  1215.               Description: Must be called to set up the routine
  1216.               PULLDOWN.  Call SETPULL only once at the beginning of
  1217.               each program using pulldown windows.
  1218.  
  1219.               Arguments:   BAR$ is the menubar.  If BAR$ = "THIS IS A
  1220.               SAMPLE" the menubar is; THIS  IS  A  SAMPLE.  Two spaces
  1221.               are placed between each menubar item ( THIS, IS, A,
  1222.               SAMPLE ).  The maximum length of the menubar is 80
  1223.               characters including the spaces.  No more than 10
  1224.               menubar items are permitted.  Error detection checks
  1225.               for the menubar length and number of items.
  1226.  
  1227.                            PWIND$() is an array that contains all of
  1228.               the strings representing the items in each pulldown
  1229.               window.  PWIND$() must be in the correct format. ( SEE:
  1230.               EXAMPLE OF A CALL TO SETPULL ).  The last item in each
  1231.               pulldown window must be followed by a "***" in PWIND$().
  1232.               "ENDPULL" in PWIND$() marks the end of all pulldown
  1233.               windows.  PWIND$(1) must be the first string in the
  1234.               array, NOT PWIND$(0).
  1235.  
  1236.               Each selectable item in PWIND$() has a "KEY CHARACTER".
  1237.               The key character is the character which is searched for
  1238.               when a key is pressed while in the PULLDOWN enviornment.
  1239.               The key character defaults to the first character in
  1240.               each item.  To designate the key character as a
  1241.               different character follow the character with a "@".
  1242.  
  1243.               EXAMPLE:
  1244.               PWIND$(1) = "Get File"        ( Key character = "G")
  1245.               PWIND$(2) = "Save F@ile"      ( Key character = "F")
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.                                   16                                  
  1252.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.               The "@" will not be displayed when the string is printed
  1262.               in the pulldown window.  The description for KEYATTR%
  1263.               for the routine PULLDOWN describes how to make the key
  1264.               character a different color, or high intensity, enabling
  1265.               users to distinguish it as the key character.
  1266.  
  1267.               NOTE: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
  1268.               STRING AS IT WILL PRINT IN THE PULLDOWN WINDOW.  AS
  1269.               STATED THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF
  1270.               THE "@" IS OMITTED FROM THE STRING.  THIS ELIMINATES THE
  1271.               NEED TO PLACE THE "@" IN POSITION TWO.
  1272.  
  1273.               If an element of PWIND$() = "-" and it is not the first
  1274.               or last item in a pulldown window it will segment the
  1275.               pulldown window by placing a line across the width of it.
  1276.               If the "-" is the first or last item in the pulldown
  1277.               window it will print as a "-".
  1278.  
  1279.               EXAMPLE:  PWIND$(3) = "-"   Providing PWIND$(3) is not
  1280.                         last item in the pulldown window PWIND$(3) will
  1281.                         print as a line across the window.
  1282.  
  1283.               --------------------------------------------------------
  1284.               EXAMPLE OF A CALL TO SETPULL
  1285.  
  1286.               BAR$ = "THIS IS A SAMPLE"     'MENUBAR STRING DEFINED.
  1287.               N%=20                         'USE THIS METHOD SO
  1288.               DIM PWIND$(N%)                'PWIND$() IS DYNAMIC.
  1289.                                             'DON'T USE DIM PWIND$(20)
  1290.               TEMP%=0
  1291.               WHILE PWIND$(TEMP%) <> "ENDPULL"
  1292.                  TEMP% = TEMP% + 1            'TEMP% MUST START WITH 1.
  1293.                  READ PWIND$(TEMP%)           'READ PULLDOWN WINDOW
  1294.               WEND                            'DATA.
  1295.  
  1296.               CALL SETPULL (BAR$, PWIND$())   'SET UP PULLDOWN ROUTINE
  1297.               ERASE PWIND$                    'COMPLETELY ERASES PWIND$()
  1298.                                               'IF IT IS DYNAMIC.
  1299.               DATA HELLO, JOE,***        :' WINDOW# 1
  1300.  
  1301.               DATA HOW, ARE, -, YOU,***  :'# 2 LINE IN ROW 3
  1302.  
  1303.               DATA I,AM@,FINE,***   :'#3 - "M" = KEY CHARACTER FOR "AM"
  1304.  
  1305.               DATA BYE,***          :'#4 - ONE ITEM.
  1306.               DATA ENDPULL          :'END OF DATA ( CASE SENSITIVE )
  1307.               --------------------------------------------------------
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.                                   17                                  
  1318.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.               First the menubar is defined, then an array is dimen-
  1328.               sioned to hold the pulldown window's data. This is only
  1329.               a temporary array to hold the data and is erased after
  1330.               SETPULL is called.  The data is then read.  The "***"
  1331.               signals the end of each pulldown window and MUST be
  1332.               entered exactly as shown. The "ENDPULL" signals the end
  1333.               for all pulldown windows and MUST be the last data item
  1334.               read. If the format is not exactly as shown an error
  1335.               will be reported or the windows will not be as expected.
  1336.               In the example shown the first menubar item is "THIS".
  1337.               It's associated pulldown window contains the two items
  1338.               "HELLO" and "JOE".  The last menubar item is "SAMPLE"
  1339.               and it's pulldown window contains one item "BYE".
  1340.  
  1341.               NOTE: THE DATA MUST BE IN THE FORMAT SHOWN.  THE CHAR-
  1342.               ACTERS "***" MARK THE END OF EACH INDIVIDUAL WINDOW AND
  1343.               THE WORD "ENDPULL" MARKS THE END OF ALL PULLDOWN WINDOWS.
  1344.  
  1345.  
  1346.          2.01 PULLDOWN (MENUBAR%, WINDITEM%, ATTR%, KEYATTR%, BORDER%)
  1347.  
  1348.               Description: Places the menubar on line one.  Places
  1349.               the user in the pulldown window environment.
  1350.  
  1351.               Arguments:   MENUBAR% is the sequential number ( left
  1352.               to right ) of selected menubar item . It is returned to
  1353.               the calling procedure (PULLDOWN).  If the second item in
  1354.               the menubar is selected, MENUBAR% will equal two. If the
  1355.               ESC key is pressed MENUBAR% = 0.
  1356.  
  1357.                            WINDITEM% represents the row number of the
  1358.               selected pulldown window item.  It is returned to the
  1359.               calling procedure.  If the ESC key is pressed WINDITEM%
  1360.               = 0.
  1361.  
  1362.               NOTE:  A LINE IN A PULLDOWN WINDOW OCCUPIES A ROW
  1363.               POSITION.
  1364.  
  1365.                            ATTR% is the color.  It follows the same
  1366.               rules as described in MAKEWIND except a flashing
  1367.               foreground is not permitted. Any value over 127 is
  1368.               changed to ATTR% MOD 128.
  1369.  
  1370.                            KEYATTR% is the color of the key character
  1371.               for each item in the pulldown windows.  If KEYATTR% = 0
  1372.               the key character will be the same color as the other
  1373.               characters in each window item.  This would be
  1374.               appropriate if the first charcter in each item is
  1375.               ALWAYS the key character. Setting KEYATTR% to a
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.                                   18                                  
  1384.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.               different color, or high intensity, allows users to
  1393.               distinguish the character as the key character for each
  1394.               item in the list.  Any value for KEYATTR% over 127 is
  1395.               changed to KEYATTR% MOD 128.
  1396.  
  1397.                            BORDER% is the pulldown window's border
  1398.               designation. BORDER% can be 0,1,2,10,11 or 12 for
  1399.               pulldown windows. Any other value for BORDER% will
  1400.               result in an error. SEE THE BORDER DESIGNATION CHART.
  1401.  
  1402.  
  1403.          2.02 CHNGPULL ( BARITEM%, WINDITEM%, ATTR% )
  1404.  
  1405.               Description: Changes the color of an item in a pulldown
  1406.               window.  Also disables or enables the ability to select
  1407.               the item.
  1408.  
  1409.               Arguments:   BARITEM% is the sequential number ( left
  1410.               to right ) of the menubar selection associated with the
  1411.               item's pulldown window.
  1412.  
  1413.                            WINDITEM% is the row position of the item
  1414.               in the pulldown window's interior.
  1415.  
  1416.               NOTE:  A LINE IN A PULLDOWN WINDOW OCCUPIES A ROW
  1417.               POSITION.
  1418.  
  1419.                            ATTR% serves two purposes.
  1420.  
  1421.               If ATTR% > 0 it changes the color of the item
  1422.               specified by BARITEM% and WINDITEM% to ATTR% ( SEE THE
  1423.               COLOR ATTRIBUTE CHART ). The key character in the item
  1424.               also assumes the color specified by ATTR%.  The ability
  1425.               to select the item from the pulldown window is disabled.
  1426.               Any value for ATTR% over 127 is changed to ATTR% MOD
  1427.               128.
  1428.  
  1429.               If ATTR% = 0 the color of the item, and it's key char-
  1430.               acter is returned to it's original status as defined in
  1431.               the original call to PULLDOWN.  The ability to select
  1432.               the item is enabled.
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.                                   19                                  
  1450.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.                          ***** SCROLL WINDOWS *****
  1460.  
  1461.          SCRLWIND places a scrollable list in the active window.
  1462.          A highlight ( scroll ) bar is placed over a specified item in
  1463.          the list and can be moved by the user via the UP and DOWN
  1464.          ARROW keys.  Pressing the ENTER key returns the sequential
  1465.          item number covered by the scroll bar.  The HOME, END, PG UP,
  1466.          and PG DN keys move the scroll bar as indicated.  SCRLWIND
  1467.          searches from the position of the scroll bar to the last item
  1468.          in the window  ( list ) to see if the key pressed is the KEY
  1469.          CHARACTER of any element of the list. If a match is found the
  1470.          scroll bar moves to that position in the list.
  1471.  
  1472.  
  1473.          3.00 SCRLWIND (LIST$(), ENTRIES%, KIND$, RTRN%, KEYATTR%)
  1474.  
  1475.               Description: Places a list ( LIST$() ) in the active
  1476.               window.  The list is ENTRIES% long.
  1477.  
  1478.               Arguments:   LIST$() is the array holding the strings to
  1479.               be placed in the scroll window.  Each element of the
  1480.               array is a line in the scroll window.  If the length of
  1481.               any element is greater then the width of the window - 4
  1482.               an error is reported. LIST$(1) must be the first string
  1483.               in the array, NOT LIST$(0).
  1484.  
  1485.               Each selectable item in LIST$() has a "KEY CHARACTER".
  1486.               The key character is the character which is searched for
  1487.               when a key is pressed while in the SCRLWIND enviornment.
  1488.               The key character defaults to the first character in
  1489.               each item.  To designate the key character as a
  1490.               different character follow the character with a "@" in
  1491.               the string.
  1492.  
  1493.               EXAMPLE: LIST$(1) = "Get File"  ( Key character = "G")
  1494.                        LIST$(2) = "Save F@ile"( Key character = "F")
  1495.  
  1496.               The "@" will not be displayed when the string is printed
  1497.               in the scroll window.  The description for KEYATTR% for
  1498.               this routine describes how to make the key character a
  1499.               different color, or high intensity, enabling users to
  1500.               distinguish it as the key character.
  1501.  
  1502.               NOTE: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
  1503.               STRING AS IT WILL PRINT IN THE SCROLL WINDOW.  AS STATED
  1504.               THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF THE
  1505.               "@" IS OMITTED FROM THE STRING.  THIS ELIMINATES THE
  1506.               NEED TO PLACE THE "@" IN POSITION TWO.
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.                                   20                                  
  1516.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.               If an element of LIST$() = "-" and it is not the first
  1526.               item in the list or the last item in the list and all of
  1527.               the items in LIST$() will fit in the window's interior
  1528.               the scroll window will be segmented.  A line will print
  1529.               across the window as determined by the position of the
  1530.               "-" in LIST$().  If the previous conditions are not met
  1531.               the string will print as a "-".
  1532.  
  1533.               EXAMPLE:  LIST$(2) = "-"  ( Provided LIST$(2) is not
  1534.                         the last item in the list and the number of
  1535.                         interior rows in the window is greater than
  1536.                         two, LIST$(2) will print as a line.)
  1537.  
  1538.                            ENTRIES% is the number of elements in the
  1539.               array ( LIST$() ) to use in the scroll window .
  1540.  
  1541.                            KIND$ is as follows;
  1542.  
  1543.               IF KIND$ = "A" when entering SCRLWIND the scroll window
  1544.               is an "AUTO-EXIT" scroll window. If the key pressed
  1545.               equals the key character of an item in the scroll window
  1546.               and the item is between the scroll bar and the end of the
  1547.               list the routine will automatically exit. The position
  1548.               of the selected item in LIST$() will be returned in
  1549.               RTRN%.  If RTRN% = 2, LIST$(2) was selected.
  1550.  
  1551.               IF KIND$ ="M" when entering SCRLWIND the scroll window is
  1552.               a "MARK" scroll window.  Pressing the <+> or INSERT key
  1553.               marks the item covered by the scroll bar.  A right arrow
  1554.               is printed to the left of the item in the scroll window
  1555.               to signify it has been marked.  Pressing the <-> or
  1556.               DELETE key un-marks an item if it was marked.  Striking
  1557.               the PRINT key or space bar marks all items, unless they
  1558.               were all previously marked, in which case the PRINT key
  1559.               or space bar will unmark all items.  Pressing the ENTER
  1560.               or RETURN key returns a coded string in KIND$ which
  1561.               represents the marked items.  If KIND$ ="" no items were
  1562.               marked.  If any items were marked KIND$ will be ENTRIES%
  1563.               long.  Each character in KIND$ will correspond to an
  1564.               element in LIST$().  If the first character of KIND$=" ",
  1565.               LIST$(1) was not marked. If the second character, in
  1566.               KIND$ = CHR$(26), LIST$(2) was marked.  Each un-marked
  1567.               element of LIST$() will have a corresponding space (" ")
  1568.               in KIND$ while each marked element will have a
  1569.               corresponding right arrow ( CHR$(26) ) in KIND$.  See the
  1570.               description for the function MARKED% for a method of
  1571.               decoding KIND$.
  1572.  
  1573.               IF KIND$ = "S" when entering SCRLWIND the scroll window
  1574.               is a "SINGLE MARK" scroll window. Provided there is more
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.                                   21                                  
  1582.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.               than one item ( ENTRIES% > 1 ) in the scroll window, one
  1591.               item will be marked as in the preceding example for a
  1592.               "MARK" scroll window.  Only one item can be marked,
  1593.               however.  The marked item follows the scroll bar.
  1594.               Pressing TAB, ENTER, RETURN or ECS will exit the scroll
  1595.               window.  If TAB, ENTER or RETURN is pressed the selected
  1596.               item number is returned in RTRN%.  If the scroll bar is
  1597.               over LIST$(2), RTRN% = 2.  If ESC is pressed RTRN% = 0.
  1598.  
  1599.               SINGLE MARK scroll windows with one entry ( ENTRIES%=1 )
  1600.               do not mark the item.  RTRN% = 1 if ENTER or RETURN is
  1601.               pressed. RTRN% = 0 if ESC is pressed and RTRN% = -1 if
  1602.               TAB is pressed.  These scroll windows can be used as
  1603.               <OK>, <CANCEL>, <ABORT> etc... scroll windows.
  1604.  
  1605.               NOTE: SEE THE SECTION LABELED "Multiple Scroll Windows"
  1606.               TO SEE HOW SINGLE MARK SCROLL WINDOWS CAN BE USED TO
  1607.               DISPLAY AND USE SEVERAL SCROLL WINDOWS AT ONE TIME.
  1608.  
  1609.               IF KIND$ = "V" the scroll window is "VIEW ONLY".  The
  1610.               window will be filled with the strings in LIST$() and the
  1611.               routine will be exited.
  1612.  
  1613.               IF KIND$ = "SV" the scroll window is "VIEW ONLY - SINGLE
  1614.               MARK" scroll window.  The window will be filled with the
  1615.               strings in LIST$().  If ENTRIES% > 1 the item designated
  1616.               by the value of RTRN% will be marked. ( See description
  1617.               for RTRN%. )
  1618.  
  1619.               Any other value for KIND$ when entering SCRLWIND results
  1620.               in a "REGULAR" scroll window. After the scroll bar
  1621.               is moved to the selected item, pressing the ENTER or
  1622.               RETURN key returns the selected item in RTRN%.
  1623.  
  1624.                            RTRN% serves two purposes. One is to place
  1625.               the scroll bar over a the item specified by RTRN% when
  1626.               entering SCRLWIND.  If RTRN% < 1 or RTRN% > ENTRIES%,
  1627.               RTRN% defaults to 1 and the scroll bar will be positioned
  1628.               over the first item in the window.
  1629.  
  1630.               EXAMPLE: RTRN% = 2  ( If there are a minimum of two
  1631.               items in the scroll window ( ENTRIES% > 1 ) the scroll
  1632.               bar will be over LIST$(2) when entering SCRLWIND. )
  1633.  
  1634.               RTRN% also returns the selected item when exiting
  1635.               SCRLWIND.  If RTRN% = 2, LIST$(2) was selected.  IF ECS
  1636.               is pressed to exit SCRLWIND, RTRN% = 0.  If TAB is
  1637.               pressed and the scroll window is a "SINGLE MARK" scroll
  1638.               window with over one entry, RTRN% returns the selected
  1639.               item.  If the scroll window is a "SINGLE MARK" scroll
  1640.               window with one entry and TAB is pressed, RTRN% = -1.
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.                                   22                                  
  1648.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.               NOTE: THE ITEM SELECTED IN LIST$() ( AS INDICTED BY THE
  1658.               VALUE OF RTRN% ) MAY CONTAIN A "@" TO INDICATE THE KEY
  1659.               CHARACTER.  IF IT IS NESESSARY TO PRINT THE ITEM THE "@"
  1660.               CAN BE REMOVED FROM IT USING THE FOLLOWING FUNCTION.
  1661.  
  1662.               ' FUNCTIONS MUST BE DECLARED.  RTRN% = ITEM # SELECTED
  1663.               ' FROM LIST$().
  1664.  
  1665.               DECLARE FUNCTION NO$( ITEM$ )
  1666.               '( Place this at the start of the module.)
  1667.  
  1668.               ' IF RTRN% = 2 AND LIST$(RTRN%) = "Save F@ile", LIST$(2)
  1669.               ' CAN BE PRINTED AS "Save File" as follows.
  1670.  
  1671.               PRINT NO$( LIST$(RTRN%) )
  1672.  
  1673.  
  1674.               ' INCLUDE THIS FUNCTION IN YOUR PROGRAM
  1675.  
  1676.               FUNCTION NO$ ( ITEM$ )
  1677.                 A% = INSTR ( ITEM$, "@" )
  1678.                 IF A% < 3 THEN        '"@" SHOULD NOT BE IN POSITION
  1679.                    NO$ = ITEM$       ' 1 OR 2, OR NO "@" IN ITEM$.
  1680.                 ELSE
  1681.                    NO$ = LEFT$(ITEM$, A% - 1) + MID$(ITEM$, A% + 1)
  1682.                 END IF
  1683.               END FUNCTION
  1684.  
  1685.  
  1686.                            KEYATTR% is the color of the key character
  1687.               for each item in the scroll window.  If KEYATTR% = 0
  1688.               the key character will be the same color as the other
  1689.               characters for each window item.  This would be
  1690.               appropriate if the first charcter in each item is ALWAYS
  1691.               the key character.   Setting KEYATTR% to a different
  1692.               color, or high intensity, allows users to distinguish the
  1693.               character as the the key character for each item in the
  1694.               list.  KEYATTR% has no effect on the background color of
  1695.               an item when it is covered by the scroll bar.  It can
  1696.               effect the background color for the key character.  This
  1697.               is useful for computers without high intensity or color
  1698.               capabilities.
  1699.               -------------------------------------------------------
  1700.               'EXAMPLE OF A CALL TO SCRLWIND - AUTO EXIT SCROLL WINDOW
  1701.  
  1702.               DIM LIST$(11)
  1703.               FOR X% = 1 TO 11              'ALWAYS START WITH 1
  1704.                  READ LIST$(X%)
  1705.               NEXT
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.                                   23                                  
  1714.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.               CALL MAKEWIND(15, "", 1, 1, 10, 13, 112, 2)
  1724.               KIND$ = "A" : RTRN% = 3: KEYATTR% = 116
  1725.               CALL SCRLWIND(LIST$(), 11, KIND$, RTRN%, KEYATTR%)
  1726.  
  1727.               DATA ONE
  1728.               DATA TW@O
  1729.               ' FOR ABOVE KEY CHAR. = "W"
  1730.               DATA TH@REE
  1731.               ' FOR ABOVE KEY CHAR. = "H"
  1732.               DATA FOUR
  1733.               DATA FIV@E
  1734.               ' FOR ABOVE KEY CHAR. = "V"
  1735.               DATA "-"
  1736.               ' FOR ABOVE PUT A LINE IN ROW 6
  1737.               DATA SIX@
  1738.               ' FOR ABOVE KEY CHAR. = "X"
  1739.               DATA SEVEN
  1740.               DATA EIGHT
  1741.               DATA NINE
  1742.               DATA TEN
  1743.               -------------------------------------------------------
  1744.  
  1745.               The scroll window is the window defined by the call to
  1746.               MAKEWIND as it is the active window when SCRLWIND is
  1747.               called.  The list in the scroll window is the items in
  1748.               the data statements, as they were read into LIST$().
  1749.               The second parameter in the call to SCRLWIND is the
  1750.               number of items in the list ( 11 ).  As KIND$ ="A"
  1751.               before calling SCRLWIND, the scroll window is an "AUTO-
  1752.               EXIT SCROLL" window. Since RTRN% = 3 when entering
  1753.               SCRLWIND the scroll bar will start over the third item (
  1754.               THREE ). The sixth DATA item    = "-". Therefore, a line
  1755.               will print in row six of the scroll window.  The key
  1756.               character for each item will be red ( KEYATTR% = 116 ).
  1757.               RTRN% will equal the selected item when SCRLWIND is
  1758.               exited.  As reading the data takes time, quicker scroll
  1759.               windows will be generated if all arrays used in scroll
  1760.               windows are filled using READ and DATA statement during
  1761.               program initialization.
  1762.  
  1763.               -------------------------------------------------------
  1764.               ' EXAMPLE - MULTIPLE SCROLL WINDOWS ( SINGLE MARK )
  1765.               ' FIRST INITIALIZE THE DATA FOR THE SCROLL WINDOWS. DO
  1766.               ' THIS AT THE BEGINNING OF THE PROGRAM FOR SPEED.
  1767.  
  1768.               DIM SWIND%(5), STR%(5), SLC%(5), SWID%(5), SNR%(5)
  1769.               DIM SENTRIES%(5), STITLE$(5)
  1770.               DIM SRTRN1$(4), SRTRN2$(5), SRTRN3$(4)
  1771.               DIM SRTRN4$(1), SRTRN5$(1)
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.                                   24                                  
  1780.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.               FOR X% = 1 TO 5       ' DATA FOR 5 SCROLL WINDOWS
  1790.  
  1791.               READ SWIND%(X%)       ' WINDOW # FOR EACH SCROLL WINDOW
  1792.               READ STR%(X%)         ' TOP ROW
  1793.               READ SLC%(X%)         ' LEFT COLUMN
  1794.               READ SWID%(X%)        ' WIDTH
  1795.               READ SNR%(X%)         ' NUMBER OF ROWS
  1796.               READ SENTRIES%(X%)    ' ENTRIES
  1797.               READ STITLE$(X%)      ' TITLE ( FOR WINDOWS TITLE BOX )
  1798.  
  1799.                  FOR Y% = 1 TO SENTRIES%(X%)
  1800.                     SELECT CASE X%         ' X% = WINDOW #
  1801.                        CASE 1
  1802.                          READ SRTRN1$(Y%)  ' LIST FOR SCROLL WINDOW 1.
  1803.                        CASE 2
  1804.                          READ SRTRN2$(Y%)  ' LIST FOR SCROLL WINDOW 2.
  1805.                        CASE 3
  1806.                          READ SRTRN3$(Y%)  ' LIST FOR SCROLL WINDOW 3.
  1807.                        CASE 4
  1808.                          READ SRTRN4$(Y%)  ' LIST FOR SCROLL WINDOW 4.
  1809.                        CASE 5
  1810.                          READ SRTRN5$(Y%)  ' LIST FOR SCROLL WINDOW 5.
  1811.                     END SELECT
  1812.                  NEXT
  1813.               NEXT
  1814.  
  1815.               ' DATA FOR EACH SCROLL WINDOW
  1816.               ' WINDOW#, TOP ROW,LEFT COLUMN,WIDTH,ROWS,ENTRIES,TITLE,
  1817.               ' ITEMS IN THE LIST
  1818.  
  1819.               DATA 16,5,16,12,8,4," TYPE",COLONIAL,SPLIT,BI-LEVEL,RANCH
  1820.               DATA 17,5,35,12,9,5," COLOR",WHITE,BLUE,TAN,BROWN,YELLOW
  1821.               DATA 18,5,54,12,8,4," LOCATION",NORTH,SOUTH,EAST,WEST
  1822.               DATA 19,14,24,14,3,1,"","----OK----"
  1823.               DATA 20,14,43,14,3,1,"","--CANCEL--"
  1824.  
  1825.               ' MARK THE FIRST ITEM IN EACH SCROLL WINDOW.  CAN BE
  1826.               ' USED FOR ANY ITEM IN THE WINDOW.
  1827.  
  1828.               SRTRN1% = 1: SRTRN2% = 1: SRTRN3% =1
  1829.  
  1830.               ' ******* LATER IN THE PROGRAM DO THIS:
  1831.  
  1832.               ' USE THE PREVIOUS DATA FOR THE MULTIPLE SCROLL
  1833.               ' WINDOWS.
  1834.  
  1835.               ' SAVE THE VALUES FOR THE MARKED ITEM IN EACH SCROLL
  1836.               ' WINDOW.  NEEDED FOR ESC OR --CANCEL-- .
  1837.  
  1838.               PRTRN1% = SRTRN1%: PRTRN2% = SRTRN2%: PRTRN3% = SRTRN3%
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.                                   25                                  
  1846.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.               ' MAKE FIVE WINDOWS. WINDOW NUMBERS 16 - 20 ( SWIND%() ).
  1856.               ' AS BORDER% MOD 100 = 0 THERE IS NO BORDER -- BE
  1857.               ' CAREFULL AS THE BLANK BORDER STILL OCCUPIES A POSITION
  1858.               ' ON THE SCREEN.
  1859.               ' AS THE BORDER (BRDR%) ARGUMENT =100 FOR WINDOWS 16, 17
  1860.               ' AND 18 THOSE WINDOWS HAVE A TITLE BOX.  THE "OK"  AND
  1861.               ' AND "CANCEL" SCROLL WINDOWS HAVE LESS THAN 5 ROWS SO
  1862.               ' THEY CAN'T HAVE NO TITLE BOX, THUS BRDR% IS SET TO 0.
  1863.               ' SINCE THE ARGUMENT FOR COLOR = 112 THE BACKGROUND
  1864.               ' COLOR WILL BE WHITE WITH A BLACK FOREGROUND.
  1865.               ' **** SUGGESTION: WHILE DEVELOPING MULTIPLE SCROLL
  1866.               ' WINDOWS SET THE BORDER TO PRINT.  THIS WILL GIVE A
  1867.               ' BETTER PICTURE AS TO HOW BIG THE WINDOWS ARE.  AFTER
  1868.               ' DEVELOPMENT THE BORDER CAN BE SET BLANK ( 100 OR 0 ).
  1869.  
  1870.               FOR X% = 1 TO 5
  1871.  
  1872.               ' BORDER IS TITLE BOX EXCEPT WINDOW 19 & 20
  1873.               IF SWIND%(X%) > 18 THEN BRDR%=0 ELSE BRDR%=100
  1874.  
  1875.               'PUT THE FOLLOWING CALL TO MAKEWIND ON ONE LINE.
  1876.                 CALL MAKEWIND (SWIND%(X%), STITLE$(X%), STR%(X%),
  1877.                               SLC%(X%), SWID%(X%), SNR%(X%), 112, BRDR%)
  1878.               NEXT
  1879.  
  1880.               KIND$ = "SV"  ' THIS MAKES THE SCROLL WINDOWS "SINGLE
  1881.                             ' MARK - VIEW" SCROLL WINDOWS FOR THE
  1882.                             ' FIRST PASS THROUGH THEM.  THE ITEMS IN
  1883.                             ' THE LIST FOR EACH SCROLL WINDOW WILL
  1884.                             ' PRINT IN THE WINDOW AND SCRLWIND WILL BE
  1885.                             ' EXITED.  AFTER ALL FIVE WINDOWS ARE
  1886.                             ' FILLED KIND$ IS SET TO "S" AND THE FIRST
  1887.                             ' SCROLL WINDOW BECOMES ACTIVE.  A USER
  1888.                             ' ACTION IS THEN REQUIRED.
  1889.  
  1890.           ' FILL THE SCROLL WINDOWS FIRST, THEN GO BACK TO THE
  1891.           ' FIRST ONE ( WINDOW # 16 ).  LAST ARGUMENT = 0 SO THE
  1892.           ' KEY CHARACTER IS THE SAME COLOR ( BLACK ON WHITE ) AS ALL
  1893.           ' OTHER CHARACTERS.  THE KEY CHARACTER IN THIS EXAMPLE IS
  1894.           ' ALWAYS THE FIRST CHARACTER.
  1895.  
  1896.           STARTS:
  1897.  
  1898.           ' SCROLL WINDOW TITLED "TYPE"
  1899.           CALL CHNGWIND (16)            ' MAKE 16 THE ACTIVE WINDOW
  1900.           CALL SCRLWIND (SRTRN1$(), SENTRIES%(1), KIND$, SRTRN1%, 0)
  1901.           IF SRTRN1% = 0  GOTO NOCHANGE       ' ESC
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.                                   26                                  
  1912.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.           ' SCROLL WINDOW TITLED "COLOR"
  1922.           CALL CHNGWIND (17)
  1923.           CALL SCRLWIND (SRTRN2$(), SENTRIES%(2), KIND$, SRTRN2%, 0)
  1924.           IF SRTRN2% = 0 GOTO NOCHANGE      ' ESC
  1925.  
  1926.           ' SCROLL WINDOW TITLED "LOCATION"
  1927.           CALL CHNGWIND (18)
  1928.           CALL SCRLWIND (SRTRN3$(), SENTRIES%(3), KIND$, SRTRN3%, 0)
  1929.           IF SRTRN3% = 0 GOTO NOCHANGE      ' ESC
  1930.  
  1931.           ' "OK" SCROLL WINDOW. SINGLE ENTRY SO NO ITEMS ARE MARKED.
  1932.           CALL CHNGWIND (19)
  1933.           CALL SCRLWIND (SRTRN4$(), SENTRIES%(4), KIND$, TEMP%, 0)
  1934.           IF TEMP% = 0 GOTO NOCHANGE        ' ESC
  1935.           IF KIND$ = "S" THEN               ' WAS NOT "SV" ( VIEW )
  1936.              IF TEMP% = 1 GOTO PROCEED      ' WAS ENTER OR RETURN
  1937.              IF TEMP% = 0 GOTO NOCHANGE     ' WAS ESC
  1938.           END IF
  1939.  
  1940.           ' "CANCEL" SCROLL WINDOW. SINGLE ENTRY SO NO ITEMS ARE MARKED.
  1941.           CALL CHNGWIND (20)
  1942.           CALL SCRLWIND (SRTRN5$(), SENTRIES%(5), KIND$, TEMP%, 0)
  1943.           IF KIND$ = "SV" THEN         ' DONE DISPLAYING WINDOWS SO
  1944.               KIND$ = "S"              ' MAKE "SINGLE MARK" SCROLL
  1945.               GOTO STARTS              ' WINDOWS AND START OVER.
  1946.           END IF
  1947.           IF TEMP% = - 1 GOTO STARTS   ' FOR SINGLE ENTRY SCROLL
  1948.                                        ' WINDOWS TEMP% = -1 FOR TAB.
  1949.  
  1950.           ' PROGRAM PROCEEDS HERE IF TAB WAS NOT PRESSED FOR
  1951.           ' "CANCEL" SCROLL WINDOW.  ENTER, RETURN OR ESC MUST HAVE
  1952.           ' BEEN PRESSED. PROGRAM GOES TO NOCHANGE TO RESTORE VALUES
  1953.  
  1954.           NOCHANGE:
  1955.           ' ESC OR CANCEL SELECTED. RESTORE PREVIOUSLY SAVED VALUES.
  1956.           SRTRN1% = PRTRN1%: SRTRN2% = PRTRN2%: SRTRN3% = PRTRN3%
  1957.  
  1958.           PROCEED:
  1959.           ' IF ENTER OR RETURN WAS PRESSED WITH THE "OK" SCROLL
  1960.           ' WINDOW ACTIVE SRTRN1%, SRTRN2%, AND SRTRN3% NOW HOLD THE
  1961.           ' MARKED ITEMS FOR THEIR RESPECTIVE SCROLL WINDOWS.  IF ESC
  1962.           ' OR "CANCEL" WAS SELECTED THE PROGRAM GOES TO NOCHANGE AND
  1963.           ' SRTRN1%, SRTRN2%, AND SRTRN3% ARE LOADED WITH THEIR OLD
  1964.           ' VALUES.
  1965.  
  1966.  
  1967.          3.01 MARKED%(RTRN$, START%)
  1968.  
  1969.               Description: MARKED%(RTRN$, START%) is a function used
  1970.               to decode RTRN$ after a call to SCRLWIND is made with
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.                                   27                                  
  1978.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.               the MARK option ON.   MARKED%(RTRN$, START%) will equal
  1987.               the next position in RTRN$ starting from position START%
  1988.               which contains a CHR$(26).  If the third element (item)
  1989.               in LIST$() was marked in the call to SCRLWIND and START%
  1990.               =1, THEN: MARKED%(RTRN$,START%) = 3.
  1991.  
  1992.               Arguments:   RTRN$ is the string returned by calling
  1993.               SCRLWIND with the MARKED option ON. RTRN$ = "" if no
  1994.               items were marked.
  1995.  
  1996.  
  1997.                           START% is the postion in RTRN$ to start
  1998.               searching for a CHR$(26).  A CHR$(26) in  RTRN$
  1999.               represents a marked element in the string array LIST$()
  2000.               used in SCRLWIND. Every time a position in RTRN$ is
  2001.               found which corresponds to a marked element of LIST$(),
  2002.               START% is set to a new value which is equal to the
  2003.               "marked" position in RTRN$ + 1.  This is the next
  2004.               position in RTRN$ where the search will start for
  2005.               another "marked" position. If MARKED% =0 there are no
  2006.               more "marked" positions in RTRN$ or RTRN$ = "".
  2007.               -------------------------------------------------------
  2008.               'EXAMPLE USING THE FUNCTION MARKED% (RTRN$,START%) THIS
  2009.               'EXAMPLE PRINTS THE MARKED ITEMS IN LIST$() AFTER A CALL
  2010.               'TO SCRWIND.
  2011.  
  2012.               'GIVEN: SCRLWIND HAS BEEN CALLED. THE FOURTH AND TENTH
  2013.               'ELEMENTS OF LIST$() WERE MARKED.  RTRN$ WAS RETURNED BY
  2014.               'A PREVIOUS THE CALL TO SCRLWIND.
  2015.  
  2016.               DECLARE FUNCTION MARKED%(RTRN$,START%)   ' MUST BE IN
  2017.               '(Put this at the start of the module)   ' MODULE USING
  2018.                                                        ' FUNC. MARKED%.
  2019.  
  2020.               START%=1                ' START THE SEARCH AT POSITION 1
  2021.                                       ' OF RTRN$.
  2022.  
  2023.               DO                                   ' MARKED% = 0 AFTER
  2024.                  A% = MARKED%(RTRN$, START%)       ' ALL MARKED ITEMS
  2025.                  IF A% = 0 THEN EXIT DO            ' ARE FOUND OR IF
  2026.                    PRINT LIST$(A%)
  2027.                  END IF
  2028.               LOOP
  2029.               -------------------------------------------------------
  2030.               The first time through the loop, MARKED% (RTRN$, START%)
  2031.               will equal 4, and LIST$(4) will print.  START% is auto-
  2032.               matically set to 5, the next position to start searching
  2033.               RTRN$ for a "marked" position in RTRN$.  The second loop
  2034.               will set MARKED% (RTRN$,START%) to 10 and LIST$(10) will
  2035.               print.  As there are no more marked positions, MARKED% =
  2036.               0 and the loop be exited.
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.                                   28                                  
  2044.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.                          ***** GET ANSWER WINDOWS *****
  2054.  
  2055.          Get answer pauses the program, prompts the user, and waits
  2056.          for the user to press a key.  The prompt may, optionally, be
  2057.          windowed.  The key may be any key, or individual keys from a
  2058.          list of permissible keys.  The area covered by the get answer
  2059.          window is restored after the key is pressed.
  2060.  
  2061.          4.00 GETANS (PROMPT$, CHOICE$, ANS$, TR%, LC%, ATTR%, BORDER%)
  2062.  
  2063.               Description: Generates a prompt with an optional window
  2064.               and pauses, waiting for a reply.
  2065.  
  2066.               Arguments:   PROMPT$ is the prompt (i.e. Press any key )
  2067.               or question (i.e. Are you sure?  Y/N ).  It may be
  2068.               optionally windowed ( SEE BORDER% ).  The width of the
  2069.               window is determined by the length of PROMPT$.  If
  2070.               PROMPT$ is too long making the window, or prompt, too
  2071.               wide to fit on the screen an error will be reported.
  2072.  
  2073.                            CHOICE$ is the valid keys the user can
  2074.               press to exit GETANS.  If CHOICE$ = "" any key will
  2075.               exit.  This would be appropriate if PROMPT$ = "Press any
  2076.               key".  If CHOICE$ = "YN" then the "Y" or "y" or "N" or
  2077.               "n" keys will exit GETANS.  The ESC key will always exit
  2078.               regardless of CHOICE$.
  2079.  
  2080.                            ANS$ is the key pressed.  It is returned in
  2081.               upper case.  If CHOICE$ = "" then ANS$ = "".  If ESC is
  2082.               pressed CHR$(27) is always returned in ANS$.
  2083.  
  2084.                            TR% is the top row.  See MAKEWIND
  2085.  
  2086.                            LC% is the left column.  See MAKEWIND
  2087.  
  2088.                            ATTR% is the color designation.  See
  2089.               MAKEWIND.  Although it is permissible to set ATTR% > 127
  2090.               to make the border flash the text will not flash.
  2091.  
  2092.                            BORDER% is the window's border designation.
  2093.               Title boxes ( BORDER% > 42 ) are not permitted.  Set
  2094.               BORDER% to 0 for no window ( prompt only ). SEE THE
  2095.               BORDER DESIGNATION CHART.
  2096.  
  2097.               EXAMPLE OF A CALL TO GETANS:
  2098.  
  2099.               CALL GETANS ("Are you sure? Y/N", "YN", ANS$, 100, 100,
  2100.               240, 11)
  2101.               ( Above must be on one line. )
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.                                   29                                  
  2110.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.               A window will be generated with the text "Are you sure?
  2120.               Y/N"  printed in it.  With TR% and LC% set to 100 the
  2121.               window will be centered on the screen ( See MAKEWIND ).
  2122.               ATTR% = 240, therefore, the window will be white with
  2123.               black text and a black flashing border. The user may
  2124.               press the N, n, Y, y, or ESC keys to exit.  The key
  2125.               pressed will be returned to GETANS in the argument ANS$.
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.                                   30                                  
  2176.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.                          ***** INPUT ROUTINES *****
  2186.  
  2187.          Input routines provide users with the ability to generate a
  2188.          single input field ( INPTWIND ), or multiple input fields
  2189.          ( MULTINPT ).  Full editing is provided within each field.
  2190.          Up to 10 multiple input screens may be used, with each screen
  2191.          capable of supporting up to 100 fields. Fields may be defined
  2192.          as numeric, alpha/numeric, or date. Numeric fields may be
  2193.          designated 0 to 6 decimal places and optionally padded with
  2194.          leading zero's.  Numerous additional options are available.
  2195.  
  2196.          5.00 INPTWIND (PROMPT$,CODE$,TR%,LC%,WD%,ATTR%,RES$,RTRN$,BORDER%)
  2197.  
  2198.               Description:  Makes an input field, which may optionally
  2199.               be windowed. The area under the field or window is auto-
  2200.               matically saved. It is restored upon exiting the routine.
  2201.  
  2202.               Arguments:   PROMPT$ is the message which will be
  2203.               printed to the left of the input field or in the title
  2204.               box of the window, if one is specified.  If PROMPT$ is
  2205.               preceded by a "@" it will be centered in the title box.
  2206.  
  2207.                            CODE$ sets the type of input field and may
  2208.               may equal the following:
  2209.  
  2210.                       "A"  - Alpha/numeric.  All standard keys are
  2211.                              active.
  2212.  
  2213.                       "U"  - Alpha/numeric.  Upper case.
  2214.  
  2215.                       "L"  - Alpha/numeric.  Lower case.
  2216.  
  2217.                       "D"  - Date.  If a field is a date field it can
  2218.                              not be exited unless the date is valid or
  2219.                              the field is blank.  The number keys, "/"
  2220.                              and "-" are active.  Valid dates range
  2221.                              from 1/1/1980 to 12/31/2099.
  2222.  
  2223.               "P0" or "0"  - Numeric. The value of the string desig-
  2224.               "P1" or "1"    nates the number of decimal places that
  2225.               "P2" or "2"    will be returned, even if more are
  2226.               "P3" or "3"    entered.   The field can not be exited
  2227.               "P4" or "4"    unless the number, with the correct
  2228.               "P5" or "5"    number of decimal places will fit in the
  2229.               "P6" or "6"    the field. or the field is blank.  The
  2230.                              numeric,"-", and "." keys are active.
  2231.                              The minus sign will only print in the
  2232.                              first position of the field.  If a
  2233.                              decimal point is in the field another one
  2234.                              can not be entered until the previous one
  2235.                              is deleted.
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.                                   31                                  
  2242.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.                NOTE: A numeric field will be padded with leading zeros
  2252.                      if CODE$ contains a "P."
  2253.  
  2254.                 EXAMPLE:     CODE$ = "3P" --- This allows numeric
  2255.                              input.  It will return the data expanded,
  2256.                              or truncated to, 3 digits after the dec-
  2257.                              imal point and padded with leading zeros.
  2258.  
  2259.                            TR% is the top row of the field, or window.
  2260.               If a window is designated, TR% must equal 1 to 23.
  2261.               Without a window  TR% must equal 1 to 25.  Setting TR%
  2262.               to 100 centers the field, or window, top to bottom.
  2263.  
  2264.                            LC% is the left column.  If a window is
  2265.               designated, LC% must equal 1 to 76 ( 36 in 40 column
  2266.               mode ). With no window LC% must equal 1 to 79 ( 39 in
  2267.               40 column mode ). If LC% = 100  the field, or window, is
  2268.               centered left to right.  If LC% is set so the input
  2269.               field with a window, if specified, or with a prompt, if
  2270.               specified, will not fit on the screen an error will be
  2271.               reported.
  2272.  
  2273.                            WD% is the fields width.  A date field must
  2274.               have WD%=10 or WD%=8.  A numeric field requires WD% to
  2275.               be from the number of ( decimal places + 1 ) to 15, and
  2276.               for an alpha/numeric field WD% can range from 1 to the
  2277.               screen width minus 1 ( minus 4 if windowed ).
  2278.  
  2279.                            ATTR% is the window's and PROMPT$'s color.
  2280.               The color of the input field is the inverse of the
  2281.               window's color.  The field's foreground color is the
  2282.               same as the window's background color while the field's
  2283.               background has the same color as the windows foreground.
  2284.               SEE THE COLOR ATTRIBUTE CAHRT.  To make the field's
  2285.               foreground color high intensity, add 1000 to ATTR%.
  2286.  
  2287.               EXAMPLE:  ATTR% = 1160.  ( 1000 + 160 ) The "160"
  2288.               produces a flashing black on green window.  ( SEE THE
  2289.               COLOR ATTRIBUTE CHART. ).  The "1000" makes the field
  2290.               text high intensity green.
  2291.  
  2292.                            RES$ is the restrict string. It holds the
  2293.               allowable characters which can be entered in the input
  2294.               field.  RES$ IS IGNORED IF CODE$ IS NOT ALPHA/NUMERIC
  2295.               ("A").  IF CODE$ IS ALPHA/NUMERIC ("A") AND RES$ = ""
  2296.               ALL STANDARD ALPHA/NUMERIC KEYS ARE ALLOWABLE. (SEE
  2297.               SETINPT IN SECTION 5.01 FOR DETAILS.)
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.                                   32                                  
  2308.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.                            RTRN$ is the string passed to, and returned
  2318.               from the input field.  A numeric string can be converted
  2319.               to a number by using the VAL function.
  2320.  
  2321.               EXAMPLE:  IF RTRN$= "123.123" IT CAN BE CONVERTED TO A
  2322.               NUMBER (A) WITH THE STATEMENT:
  2323.  
  2324.                            A = VAL(RTRN$)
  2325.                            A now equals 123.123
  2326.  
  2327.                            BORDER% is the input windows border. ( SEE
  2328.              THE BORDER DESIGNATION CHART ). If BORDER% = 0 a single
  2329.              line input field ( no window ) is generated.  If BORDER%
  2330.              produces a title box window, PROMPT$ will printed in the
  2331.              title box.
  2332.  
  2333.  
  2334.          5.01 SETINPT ( SCRN%, COLWID%, EXIT$, INPT%(), INPT$(), ACTCOL% )
  2335.  
  2336.               Description: Defines a multi-field input screen, which
  2337.               will be called by MULTINPT.
  2338.  
  2339.               Arguments:   SCRN% is the number or the screen being
  2340.               defined.  SCRN% may range from 1 to 10.
  2341.  
  2342.                            COLWID% is the column width of the screen
  2343.               and must equal 40 or 80.
  2344.  
  2345.                            EXIT$ is the code for keys which will
  2346.               exit the multi-field input routine for the designated
  2347.               screen number.  To make the function keys active place
  2348.               their number "1","2" etc in EXIT$.   A "0" represents
  2349.               the F10 key, a "D" the PGDN key and a "U" the PGUP key.
  2350.  
  2351.               EXAMPLE: IF EXIT$ ="03U" THE F10, F3, OR PGUP KEYS WILL
  2352.               EXIT THE MULTI-FIELD INPUT ROUTINE ( MULTINPT ).
  2353.  
  2354.                            INPT%() and INPT$() hold the data
  2355.               representing the parameters for each field in the multi-
  2356.               field input screen.  Starting at INPT%(1) and INPT$(1),
  2357.               INPT%() AND INPT$() are as follows;
  2358.  
  2359.                            ------------ INPT%() ---------- -INPT$()-
  2360.                             1      2    3    4     5    6    1
  2361.               (Field #1)   CODE%, TR%, LC%, WD%, ATTR%, 99, RES$
  2362.               (Field #2)   ...... Repeat above for each field
  2363.                            9999 ( signals end of INPT%()/INPT$() )
  2364.  
  2365.               INPT%(1)=CODE% FOR FIELD 1, INPT%(7)=CODE% FOR FIELD 2
  2366.               INPT$(1)=RES$ FOR FIELD 2, INPT$(2)=RES$ FOR FIELD 2
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.                                   33                                  
  2374.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.                            CODE% is the code for type of input field
  2384.               and can be as follows;
  2385.  
  2386.               0 to 6 ----- The field is numeric with the indicated
  2387.               number of decimal places.
  2388.  
  2389.               10 to 16 --- The field is numeric with padded zeros.
  2390.               Subtract 10 to obtain the number of decimal places.
  2391.  
  2392.               7 ---------- The field is alpha/numeric.
  2393.               8 ---------- The field is a date field.
  2394.               17 --------- The field is alpha/numeric. (upper case)
  2395.               27 --------- The field is alpha/numeric. (lower case)
  2396.  
  2397.               Adding 100 to CODE% makes the field protected.  A
  2398.               protected field will be displayed but can not be
  2399.               edited.   A protected field can not be an Auto-advance
  2400.               or Auto-exit field.  If a protected field is defined as
  2401.               an Auto-exit or Auto-advance field the definition is
  2402.               ignored and the field remains a protected field.
  2403.  
  2404.               Adding 1000 to CODE% makes the field an Auto-advance
  2405.               field.  When the cursor reaches the end of an Auto-
  2406.               advance field, via typing a character, it moves to the
  2407.               next field.  ( User defined order. )
  2408.  
  2409.               Adding 10000 to CODE% makes the field an "Auto-exit
  2410.               always" field.   The multi-field input routine will be
  2411.               exited whenever the cursor is moved from an "Auto-exit
  2412.               always" field.
  2413.  
  2414.               Adding 20000 to CODE% makes the field an "Auto-exit on
  2415.               change" field.  The multi-field input routine will be
  2416.               exited only when the data in the field is changed and
  2417.               the cursor is moved from the field.  This is useful if a
  2418.               field is part of a formula to calculate another fields
  2419.               value.
  2420.  
  2421.               Adding 30000 to CODE% makes the field a "Fixed choice"
  2422.               field.  A fixed choice field will exit the multi-field
  2423.               input routine if the space bar is pressed or if the
  2424.               cursor is moved from the field.   This makes the field
  2425.               an auto-exit (always) field.  The description for the
  2426.               procedure MULTINPT describes the details of a "fixed
  2427.               choice" field.
  2428.  
  2429.               EXAMPLE: If CODE%= 21017 THEN CODE% = 20000+1000+17.
  2430.               THE FIELD IS ALPHA/NUMERIC ( UPPER CASE ), AUTO-ADVANCE
  2431.               AND "AUTO-EXIT ON CHANGE".
  2432.  
  2433.                ** SEE THE MULTI-FIELD CODE CHART IN THE APPENDIX.**
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.                                   34                                  
  2440.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.                            TR%, LC%, and WD% are the same as in
  2450.               INPTWIND.
  2451.  
  2452.                            ATTR% is the fields color.
  2453.  
  2454.                            99 is a check and must follow the numeric
  2455.               data which defines each field.
  2456.  
  2457.                            RES$ defines the allowable characters
  2458.               in a restricted field.  If the field is not set to
  2459.               alpha/numeric by CODE%, RES$ is ignored.  Setting RES$ to
  2460.               "YN" and CODE% TO 17 ( UPPER CASE ) allows the field to
  2461.               respond to Y,y,N or n.  If CODE% = 7 ( UPPER AND LOWER
  2462.               CASE ) and RES$ ="YN" the field is restricted to Y or N.
  2463.               IF CODE%=27 ( LOWER CASE ) and RES$ ="YN" the field will
  2464.               not allow any characters.  If RES$ = "" the field is not
  2465.               restricted and will respond to characters predicated on
  2466.               the value of CODE%.
  2467.  
  2468.               NOTE: IT IS ONLY NECESSARY TO USE RES$ FOR NON-STANDARD
  2469.               FIELDS.  SET RES$ TO "" FOR NORMAL ALPHA/NUMERIC FIELDS
  2470.               OR THE RESULT WILL BE EXTRA CODE AND MEMORY USAGE.  IF
  2471.               THE FIELD IS STANDARD ALPHA/NUMERIC MAKE CODE% = 7 AND
  2472.               RES$ = "".  THIS WILL ALLOW UPPER/LOWER CASE ALPHA/NUM-
  2473.               ERIC INPUT.
  2474.  
  2475.                      EXAMPLE: RES$ = "0123456789-( )"
  2476.  
  2477.                      THIS RESTRICTS INPUT TO CHARACTERS INCLUDED IN
  2478.                      A PHONE NUMBER WITH THE AREA CODE.
  2479.  
  2480.                            ACTCOL% is the color attribute of the active
  2481.               input field.  Use ACTCOL% to make the active field a
  2482.               different color than the inactive fields.  If ACTCOL% = 0,
  2483.               ACTCOL% is ignored and the active field's color will not
  2484.               change.   ACTCOL% is adjusted to ACTCOL% MOD 128.
  2485.  
  2486.               -------------------------------------------------------
  2487.               'EXAMPLE OF A CALL TO SETINPT
  2488.  
  2489.               A% = 20: B% = 3            ' SET UP TEMPORARY ARRAYS FOR DATA.
  2490.               DIM INPT% (A%), INPT$(B%)  ' USE THIS METHOD SO ARRAY WILL BE
  2491.                                          ' DYNAMIC AND CAN BE DE-ALLOCATED
  2492.                                          ' LATER. DON'T USE DIM INPT%(20)
  2493.  
  2494.               FLD% = 1
  2495.               B% = 1                     ' ALWAYS START THE ARRAYS AT 1
  2496.               DO                         ' OR THE FIRST FIELD WILL BE
  2497.                 READ INPT%(B%)           ' LOST.
  2498.                 IF INPT%(B%)=9999 THEN EXIT DO   ' 9999 MARKS THE END
  2499.                 B% = B% + 1
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.                                   35                                  
  2506.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.                 FOR X% = 1 TO 5
  2516.                   READ INPT%(B%)         ' READ REMAINING NUMERIC DATA
  2517.                   B% =B% + 1             ' IN INPT%().  TR%,LC%,WD%
  2518.                 NEXT                     ' ATTR% AND THE CHECK (99).
  2519.                 READ INPT$(FLD%)         ' THEN READ INPT$() DATA FOR
  2520.                 FLD% = FLD% + 1          ' RESTRICTED FIELDS.
  2521.               LOOP
  2522.  
  2523.               DATA 0,1,1,15,112,99,""
  2524.               ' NUMERIC - TR%=1, LC%=1, WD%=15, ATTR%=7, CHECK MUST=99
  2525.               ' NOT RESTRICTED. THIS IS FIELD #1 (1st DATA STATEMENT)
  2526.  
  2527.               DATA 17,3,1,1,112,99,"YN"
  2528.               ' ALPHA/NUM ( UPPER CASE ) TR%=3, LC%=1, WD%=1, ATTR%=7
  2529.               ' CHECK MUST=99, RESTRICTED TO Y,N,y,or n.
  2530.               ' THIS FIELD #2 (2nd DATA STATEMENT)
  2531.  
  2532.               DATA 108,5,1,10,32,99,""
  2533.               ' PROTECTED DATE - TR%=5, LC%=1 WD%=10, ATTR%=32
  2534.               ' CHECK MUST = 99', NOT RESTRICTED
  2535.               ' THIS IS FIELD #3 (3rd DATA STATEMENT)
  2536.  
  2537.               DATA 9999
  2538.               ' 9999 MARKS THE END
  2539.  
  2540.               CALL SETINPT( 1, 80, "12", INPT%(), INPT$(), 15 )
  2541.  
  2542.               ERASE INPT%, INPT$       ' GET THE MEMORY BACK
  2543.  
  2544.               '------------------------------------------------------
  2545.               ' THE MULTI-FIELD INPUT SCREEN (#1) IS 80 COLUMNS WIDE
  2546.               ' AND WILL BE EXITED IF THE F1 OR F2 KEYS ARE PRESSED.
  2547.               ' THERE ARE 3 FIELDS AS PER THE DATA STATEMENTS. A CALL
  2548.               ' TO MULTINPT WILL DISPLAY THE FIELDS AND WAIT FOR
  2549.               ' INPUT. INPUT ENDS WHEN THE F1 OR F2 KEYS ARE PRESSED.
  2550.               ' THE ACTIVE FIELD WILL BE HIGH INTENSTIY WHITE ON BLACK.
  2551.               '-------------------------------------------------------
  2552.  
  2553.          5.02 MULTINPT ( SCRN%, FLD%, EXIT$, AUTOEXIT%, RTRN$() )
  2554.  
  2555.               Description: Displays input fields defined in a previous
  2556.               call to SETINPT.  Fields are available for full editing
  2557.               Returns edited strings to the calling program.
  2558.  
  2559.               Arguments:   SCRN% is the number ( 1 to 10 ) of the
  2560.               multi-field input screen to display.
  2561.  
  2562.                            FLD% serves two purposes.  When entering
  2563.               MULTINPT, FLD% determines which field will be the
  2564.               active field ( the one with the cursor ).  It may range
  2565.               from one to the last field as designated by SETINPT.
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.                                   36                                  
  2572.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.               When exiting MULTINPT, FLD% points to the next field the
  2582.               cursor would normally occupy.  If a field is auto-exit
  2583.               ( always ) and the down arrow is pressed, MULTINPT will
  2584.               be exited.  FLD% will point to the field the cursor
  2585.               would normally occupy via the down arrow being pressed.
  2586.               This enables MULTINPT to be exited by an auto-exit
  2587.               field and re-entered at the correct field.  If the field
  2588.               is a fixed choice field and the space bar is pressed,
  2589.               FLD% will point to the fixed choice field ( the one the
  2590.               cursor was in before MULTINPT was exited ).
  2591.  
  2592.                            EXIT$ also serves two purposes.  When
  2593.               entering MULTINPT, setting EXIT$ to "VIEW" causes
  2594.               MULTINPT to print and fill the fields with their
  2595.               corresponding data.  MULTINPT is then exited.  This is
  2596.               useful for viewing a multi-field screen or updating a
  2597.               single field ( see AUTOEXIT% ).  Any other value for
  2598.               EXIT$, allows MULTINPT to act normally.  The field or
  2599.               fields are filled and the program requires user input.
  2600.  
  2601.               When exiting MULTINPT, EXIT$ will equal "F1" to "F10",
  2602.               "PGUP" or "PGDN" if a valid exit key was pressed.  Valid
  2603.               exit keys are determined via the call to SETINPT for the
  2604.               multi-field input screen.   EXIT$ will equal "AUTO" when
  2605.               MULTINPT is exited, if it was exited by an auto-exit
  2606.               field.  EXIT$ will equal "FIXED" if MULTINPT is exited
  2607.               when the space bar is pressed and the cursor is in a
  2608.               fixed choice field.  It is important to note that fixed
  2609.               choice fields are also auto-exit ( always ) fields.  If a
  2610.               fixed choice field is exited via the cursor moving from
  2611.               it to another field EXIT$ will equal "AUTO".  NOTE: EXIT$
  2612.               IS CASE SENSITIVE.
  2613.  
  2614.                            AUTOEXIT% also serves two purposes.  If
  2615.               AUTOEXIT% is set to zero, MULTINPT, when entered, will
  2616.               update all fields.  If AUTOEXIT% is set from one to the
  2617.               last field number only the specified field is updated.
  2618.               This allows quick exiting from, and re-entering of
  2619.               MULTINPT.
  2620.  
  2621.               When MULTINPT is exited AUTOEXIT% is set to zero or to
  2622.               an auto-exit field number.  The value of AUTOEXIT%
  2623.               remains the same if MULTINPT is exited by an exit key
  2624.               (F1,F2..) or by an auto-exit or fixed choice field.  The
  2625.               following conditions will set AUTOEXIT% to a field
  2626.               number ( not zero ).
  2627.  
  2628.               1. The cursor was in an auto-exit field ( always )
  2629.                  field and MULTIPT was exited by an exit key or the
  2630.                  auto-exit feature ( cursor moving from the field ).
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.                                   37                                  
  2638.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.               2. The cursor was in an autoexit ( on change ) field,
  2648.                  the field's data was changed, and MUTINPT was exited
  2649.                  by an exit key or the auto-exit feature.
  2650.  
  2651.               3. The cursor was in a fixed choice field and MULTINPT
  2652.                  was exited by an exit key, by the space bar being
  2653.                  pressed, or by moving the cursor from the fixed
  2654.                  choice field.  As previously stated fixed choice
  2655.                  fields are also autoexit ( always ) fields.
  2656.  
  2657.               NOTE: If the cursor is in an auto-exit or fixed choice
  2658.               field and MULTINPT is exited via an exit key (F1,F2..)
  2659.               EXIT$ will not equal "AUTO".  It will equal the key
  2660.               pressed ( F1,F2 .. etc. ).  Check AUTOEXIT% to verify
  2661.               if the cursor was in an auto-exit field when MULTINPT
  2662.               was exited.
  2663.  
  2664.               If AUTOEXIT% equals a valid field number ( not zero) and
  2665.               EXIT$ = "VIEW" when entering MULTINPT, the field
  2666.               specified by the value of AUTOEXIT% will be updated and
  2667.               MULTINPT will be exited.  This method can be used to
  2668.               update any single field and exit.
  2669.  
  2670.                            RTRN$() is a string array which holds the
  2671.               data to be edited.  Elements of RTRN$() will be
  2672.               displayed in the appropriate fields.  RTRN$(1) will be
  2673.               displayed in field 1 and so on.  Make sure there is not
  2674.               a RTRN$(0) as it will not be displayed.  If a field is
  2675.               numeric, the number to be placed in it must be converted
  2676.               to a string.  Convert the number (A) to a string as
  2677.               follows:   RTRN$(2) = STR$(A)
  2678.  
  2679.               When MULTINPT is exited RTRN$() holds the data in it's
  2680.               edited state.
  2681.  
  2682.               Upon entering MULTINPT, if the field is designated as
  2683.               alpha/numeric and the string will not fit in the field
  2684.               it will be truncated to fit.  If the field is numeric
  2685.               and a number formatted to the correct number of decimal
  2686.               places will not fit in the field, "*"'s will be printed.
  2687.               This will not pose a problem if RTRN$() is initialized
  2688.               via MULTINPT, as MULTINPT will not allow the user to
  2689.               input data longer than the field's width.  If a numeric
  2690.               field is entered with an alpha string the string will
  2691.               print in the field. It is the programmer's responsibility
  2692.               to assure numeric fields contain numeric strings.  IF
  2693.               A FIELD IS NUMERIC WITH 4 DECIMAL PLACES SETTING THE
  2694.               FIELD TO EQUAL "DOG", WILL RESULT IN DOG.0000 BEING
  2695.               DISPLAYED!
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.                                   38                                  
  2704.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.               Use caution if a field is a result of calculation, as
  2714.               the result may be in exponential format.  EXAMPLE:
  2715.  
  2716.                      A = 1       B = 14      C = A/B
  2717.  
  2718.               STR$(C) = "7.142857E-02".  If the field is numeric with
  2719.               four decimal places and set to equal STR$(C) it will
  2720.               print as 7.1428, and not as .0714.
  2721.  
  2722.               To following routine corrects numbers in expoential form
  2723.               for both large and small numbers.  A$ is the numeric
  2724.               string to be displayed in a field.
  2725.  
  2726.               IF INSTR(3, A$, "+") THEN A$ = "9999999999999999"
  2727.               REM: THE NUMBER WAS TOO LARGE. ( EX: 2.2D+22 )
  2728.               REM: SET TO "9999999999999999" AND "*"'s WILL
  2729.               REM :BE DISPLAYED.
  2730.  
  2731.               IF INSTR(3, A$, "-") THEN
  2732.                  A# = VAL(A$): A# = A# + SGN(A#): A$ = STR$(A#)
  2733.                  IF ABS(A#) > 1 THEN
  2734.                     A$ = MID$(A$, INSTR(A$, "."))
  2735.                     IF A# < 1 THEN A$ = "-" + A$
  2736.                  ELSE
  2737.                     A$="0"
  2738.                  END IF
  2739.               END IF
  2740.               REM: THE NUMBER WAS TOO SMALL. IF A$ = "3.33D-4",
  2741.               REM: A$ WILL NOW = ".000333"
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.                                   39                                  
  2770.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.        ---------------------------------------------------------------
  2780.              FIELD EDITING FEATURES FOR "MULTINPT" AND "INPTWIND"
  2781.                   ( * = AVAILABLE FOR "MULTINPT" ONLY. )
  2782.        ---------------------------------------------------------------
  2783.        KEY                FUNCTION
  2784.  
  2785.        SPACE BAR       ERASES FIELD - IF IT IS THE FIRST KEY PRESSED.
  2786.  
  2787.        *UP ARROW       MOVES THE CURSOR FROM FIELD TO FIELD AS DETER-
  2788.        *DOWN ARROW     MINED BY THE ORDER DEFINED IN "SETINPT."  THE
  2789.                        DOWN ARROW MOVES THE CURSOR IN ASCENDING FIELD
  2790.                        ORDER. THE UP ARROW MOVES IT IN DESCENDING
  2791.                        FIELD ORDER.  PROTECTED FIELDS ARE SKIPPED.
  2792.  
  2793.        *CTRL END       MOVES THE CURSOR TO THE FIRST OR LAST FIELD AS
  2794.        *CTRL HOME      DESIGNATED BY THE ORDER DEFINED IN "SETINPT".
  2795.  
  2796.        *TAB            MOVES THE CURSOR FROM FIELD TO FIELD HORIZONT-
  2797.        *SHIFT TAB      ALLY. TAB MOVES LEFT TO RIGHT, SHIFT TAB MOVES
  2798.                        RIGHT TO LEFT. PROTECTED FIELDS ARE SKIPPED.
  2799.  
  2800.        CTRL E          ERASES THE FIELD.
  2801.  
  2802.        ESC             RETURNS THE FIELD TO IT'S PRE-EDITED STATE.
  2803.                        EXITS "INPTWIND" WITH PRE-EDITED STRING. WILL
  2804.                        DISPLAY PRE-EDITED STRING IN "MULTINPT".  ANY
  2805.                        ATTEMPT TO EXIT A FIELD CHANGES THE PRE-EDITED
  2806.                        TEXT TO THE DISPLAYED TEXT.
  2807.  
  2808.        ENTER           EXITS "INPTWIND".  SAME AS DOWN ARROW FOR
  2809.        RETURN          "MULTINPT".
  2810.  
  2811.        END             MOVES THE CURSOR TO THE FIRST OR LAST POSITION
  2812.        HOME            OF TEXT WITHIN A FIELD.
  2813.  
  2814.        BACKSPACE       DELETES THE CHARACTER TO THE LEFT OF CURSOR.
  2815.  
  2816.        DELETE          DELETES THE CHARACTER UNDER THE CURSOR AND
  2817.                        SHIFTS CHARACTERS LEFT.
  2818.  
  2819.        INSERT          TOGGLES FROM INSERT TO OVERSTRIKE MODE. IF MODE
  2820.                        IS OVERSTRIKE THE CURSOR IS LARGE. INSERT MODE
  2821.                        IS THE DEFAULT EVERY TIME A FIELD IS ENTERED.
  2822.  
  2823.        RIGHT ARROW     MOVES THE CURSOR LEFT OR RIGHT.  ACTS THE SAME
  2824.        LEFT ARROW      AS TAB OR SHIFT TAB FOR "MULTINPT" IF THE
  2825.                        CURSOR IN IN POSITION 1 AND THE LEFT ARROW IS
  2826.                        PRESSED, OR THE CURSOR IS AT THE END OF THE
  2827.                        TEXT AND THE RIGHT ARROW IS PRESSED.
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.                                   40                                  
  2836.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.                          *****  DIRECTORY ROUTINES *****
  2846.  
  2847.          Directory routines compliment features included with
  2848.          QuickBASIC and BASIC 7.+ ( PDS )..  Procedures to find the
  2849.          current disk,  current path, disk capacity, and disk space
  2850.          available are supplied with WINDOWS R-E-Z.  Also included are
  2851.          routines to find the directory of any disk or path.  In
  2852.          addition a file's size, date, time, and attributes can be
  2853.          found.
  2854.  
  2855.          6.00 GETDISK (DRIVE%)
  2856.  
  2857.               Description: Retrieves the default disk drive.
  2858.  
  2859.               Argument:    DRIVE% is the current drive.  DRIVE% = 1
  2860.               for drive A:, 2 for B:, 3 for C:, 4 for D:, etc.
  2861.  
  2862.  
  2863.          6.01 FINDPATH (PATH$)
  2864.  
  2865.               NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
  2866.               ROUTINE.  SEE SECTION " MAKING A DIRECTORY SCROLL
  2867.               WINDOW"
  2868.  
  2869.               Description: Retrieves the current path ( directory ).
  2870.  
  2871.               Argument:    PATH$ is the path in the format:
  2872.  
  2873.                      DRIVE:\SUB-DIRECTORY\SUB-DIRECTORY\....
  2874.  
  2875.               PATH$ always starts with the drive letter and always
  2876.               ends with a "\".
  2877.  
  2878.  
  2879.          6.02 SETDISK (DRIVE%, BADFLAG%)
  2880.  
  2881.               Description: Changes the default drive.
  2882.  
  2883.               Arguments:   DRIVE% is the drive designation.  DRIVE% =
  2884.               1 for drive A:, 2 for B:, 3 for C:, etc.
  2885.  
  2886.                            BADFLAG% = 1 if DRIVE% is less than 1 or
  2887.               greater than the number of logical drives.  BADFLAG% = 0
  2888.               if DRIVE% is in the range from 1 to the number of logical
  2889.               drives in the system.
  2890.  
  2891.               NOTE: A SYSTEM WITH A FLOPPY DRIVE FOR DRIVE A: AND A
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.                                   41                                  
  2902.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.               HARD DISK FOR DRIVE C: HAS 3 LOGICAL DRIVES.  THEREFORE,
  2911.               BADFLAG% WILL = 0 IF DRIVE% = 1 TO 3 EVEN THOUGH A
  2912.               PHYSICAL DRIVE B: DOES NOT EXIST.  ATTEMPTS TO ACCESS
  2913.               DRIVE B: MAY RESULT IN THE DOS MESSAGE. "Place a disk in
  2914.               drive B: and press any key" BEING DISPLAYED.
  2915.  
  2916.  
  2917.          6.03 DISKSIZE (DRIVE%, SIZE&, FREE&)
  2918.  
  2919.               NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
  2920.               ROUTINE.  SEE SECTION " MAKING A SCROLL DIRECTORY
  2921.               WINDOW".
  2922.  
  2923.               Description: Retrieves disk space and disk free space.
  2924.  
  2925.               Arguments:   DRIVE% is the drive designation.  It
  2926.               follows the same rules as detailed in SETDISK.  The note
  2927.               for SETDISK applies.
  2928.  
  2929.                            SIZE& is the size in bytes of disk space.
  2930.  
  2931.                            FREE& is the size in bytes of free disk
  2932.               space.
  2933.  
  2934.               NOTE: THE ARGUMENTS FOR SIZE AND FREE SPACE ARE LONG
  2935.               INTEGERS.  ANY VARIABLE USED TO REPRESENT THEM MUST BE
  2936.               DESIGNATED AS A LONG INTEGER ( FOLLOWED BY A "&" SIGN )
  2937.               OR A PARAMETER MIS-MATCH WILL BE REPORTED.
  2938.  
  2939.  
  2940.          6.04 FINDDIR (PATH$, TYP$, FILE%)
  2941.  
  2942.               NOTE # 1: THE FOLLOWING MUST BE PLACED BEFORE ANY
  2943.               EXECUTABLE STATEMENTS IN ANY MODULE CALLING "FINDIR"
  2944.  
  2945.                 TYPE DIREC
  2946.                    SIZE AS LONG
  2947.                    DATE AS STRING * 10
  2948.                    TIME AS STRING * 6
  2949.                    ATTR AS INTEGER
  2950.                 END TYPE
  2951.                 COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
  2952.  
  2953.               NOTE # 2: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING
  2954.               THIS ROUTINE.  SEE SECTION " MAKING A SCROLL DIRECTORY
  2955.               WINDOW"
  2956.  
  2957.               Description:  Puts the directory listing of the
  2958.               specified path in an array, DIREC$().  If a long
  2959.               directory search is requested the files size, date, time
  2960.               and attributes are also placed in array, DIRINFO().  The
  2961.               arrays MUST be defined as explained above in NOTE # 1.
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.                                   42                                  
  2968.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.               Arguments:    PATH$ is the path for the directory
  2978.               listing search.  It must be in the same format as
  2979.               returned by the procedure FINDPATH.  It may be expanded
  2980.               to restrict the search.  Wildcards are permitted.
  2981.  
  2982.               EXAMPLE: IF PATH$ = "C:\TEST\*.BAS", THE SEARCH WILL
  2983.               FIND FILES IN DRIVE C:, SUB-DIRECTORY "TEST", WITH THE
  2984.               EXTENSION ".BAS".
  2985.  
  2986.               TYP$ designates the attributes of the files to include
  2987.               in the search.  An "L" in TYP$ tells FINDDIR to make a
  2988.               long directory search.  The file's size, date, time and
  2989.               attributes are found in a long directory search, in
  2990.               addition to the files name.  TYP$ may contain any
  2991.               combination of the following:
  2992.  
  2993.                            A - archived files
  2994.                            H - hidden files
  2995.                            S - system files
  2996.                            R - read only files
  2997.                            D - sub-directory listings
  2998.                            V - volume entry
  2999.                            O - no file attribute
  3000.                            L - long directory search - SEE ABOVE
  3001.  
  3002.               EXAMPLE:  IF TYP$ = "HS" ONLY HIDDEN AND SYSTEM FILES
  3003.               WILL BE FOUND.
  3004.  
  3005.                            FILE% is the number of files found.  FILE% =
  3006.               0 if no files were found.
  3007.  
  3008.               If files are found their names are placed in the array,
  3009.               DIREC$().  A long directory search places the file's
  3010.               size, date, time and attrtibute designation in
  3011.               DIRINFO().
  3012.  
  3013.               DIREC$(1) = The name of first file found.
  3014.               DIRINFO(1).SIZE = The size of the file.
  3015.               DIRINFO(1).DATE = The files creation or last update date.
  3016.               DIRINFO(1).TIME = The files creation or last update time.
  3017.               DIRINFO(1).ATTR = The files attribute designation.
  3018.  
  3019.               The following describes DIRINFO(1).ATTR;
  3020.  
  3021.               IF DIRINFO(1).ATTR AND 1 the file is a read only file.
  3022.               IF DIRINFO(1).ATTR AND 2 the file is a hidden file.
  3023.               IF DIRINFO(1).ATTR  AND 4 the file is a system file.
  3024.               IF DIRINFO(1).ATTR  AND 8 the entry is a volumn entry.
  3025.               IF DIRINFO(1).ATTR  AND 16 the entry is a sub-directory.
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.                                   43                                  
  3034.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.               IF DIRINFO(1).ATTR  AND 32 the files archived bit is set.
  3044.               IF DIRINFO(1).ATTR  = 0 the file has no attribute.
  3045.  
  3046.               NOTE:  WHEN FINDDIR IS CALLED THE ARRAY, DIREC$() IS
  3047.               AUTOMATICALLY DIMENSIONED TO THE NUMBER OF FILES FOUND.
  3048.               THE ARRAY, DIRINFO() IS ALSO DIMENSIONED TO THE NUMBER
  3049.               OF FILES FOUND PROVIDING THE DIRECTORY SEARCH IS A LONG
  3050.               DIRECTORY SEARCH.  EACH FILE FOUND USES ABOUT 16 BYTES
  3051.               OF MEMORY PLUS AN ADDITIONAL 22 BYTES IF THE DIRECTORY
  3052.               SEARCH IS LONG.  TO RECLAIM THE MEMORY ( AFTER USING THE
  3053.               INFORMATION RETURNED BY THE CALL TO FINDDIR ) THE ARRAYS
  3054.               MUST BE ERASED VIA THE STATEMENT:
  3055.  
  3056.                            ERASE DIREC$, DIRINFO
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.                                   44                                  
  3100.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.                   ***** MAKING A DIRECTORY SCROLL WINDOW *****
  3110.  
  3111.               REM: THIS EXAMPLE FINDS THE DIRECTORY LISTING OF
  3112.               REM: ARCHIVED FILES IN DRIVE A.  IT PUTS THE LISTING IN
  3113.               REM: A SCROLL WINDOW AND WAITS FOR THE SELECTION OF A
  3114.               REM: FILE.
  3115.  
  3116.               TYPE DIREC                  ' REQUIRED IN ANY MODULE
  3117.                    SIZE AS LONG           ' USING DIRECTORY ROUTINES.
  3118.                    DATE AS STRING * 10
  3119.                    TIME AS STRING * 6
  3120.                    ATTR AS INTEGER
  3121.               END TYPE
  3122.               COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
  3123.  
  3124.               CALL SETWIND(1,1,7,0,1,1)  ' INITIALIZE
  3125.  
  3126.               START:
  3127.               CLS
  3128.               ON ERROR GOTO DISKERROR    ' ALWAYS TRAP FOR DISK
  3129.                                          ' ERRORS.
  3130.  
  3131.               REM: AS TYP$ INCLUDES AN "A",THE  FOLLOWING CALL TO
  3132.               REM: FINDDIR PLACES ARCHIVED FILES, FROM DRIVE A:,
  3133.               REM: ("A:\"), IN DIREC$().  AS TYP$ INCLUDES AN "L" THE
  3134.               REM: FILES SIZE, DATE, TIME AND ATTRIBUTES ARE PLACED IN
  3135.               REM: DIRINFO().  FILE% HOLDS THE NUMBER OF FILES FOUND.
  3136.  
  3137.               TYP$ ="AL"
  3138.               CALL FINDDIR ("A:\", TYP$, FILE%)
  3139.  
  3140.               IF FILE% > 0 THEN       ' ONLY IF FILES EXISTED.
  3141.  
  3142.                   REM: MAKE A WINDOW.  STATEMENT MUST BE ON 1 LINE
  3143.  
  3144.                   CALL MAKEWIND(1 ,"@Select file - Press ENTER",
  3145.                   100 ,100 ,30 ,10 ,15 ,101)
  3146.  
  3147.                   REM: MAKE IT AN AUTO-EXIT SCROLL WINDOW.
  3148.  
  3149.                   KIND$ ="A"                ' AUTO-EXIT FEATURE IS ON.
  3150.  
  3151.                   CALL SCRLWIND(DIREC$(), FILE%, KIND$, RTRN%, 0)
  3152.  
  3153.                   IF RTRN% <> 0 THEN
  3154.                       LOCATE 1,1
  3155.                       PRINT "FILE .......";DIREC$(RTRN%)
  3156.                       PRINT "SIZE........";DIRINFO(RTRN%).SIZE
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.                                   45                                  
  3166.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.                       PRINT "DATE........";DIRINFO(RTRN%).DATE
  3175.                       PRINT "TIME........";DIRINFO(RTRN%).TIME
  3176.                       PRINT "ATTRIBUTE...";DIRINFO(RTRN%).ATTR
  3177.                       ERASE DIREC$, DIRINFO
  3178.                    END IF
  3179.  
  3180.                    CALL RSTRWIND(1,1)        ' REMOVE THE WINDOW
  3181.  
  3182.                    IF RTRN%= 0 THEN GOTO START 'ESC WAS PRESSED
  3183.               ELSE             ' FILE% = 0 ( NO FILES WERE FOUND )
  3184.                    PRINT "NO FILES WERE FOUND" ENDIF
  3185.  
  3186.               ON ERROR GOTO 0             ' TURN OFF ERROR DETECTION
  3187.  
  3188.               END
  3189.  
  3190.               DISKERROR:
  3191.  
  3192.               REM: ERR = ERROR NUMBER. THIS ERROR HANDLING ROUTINE
  3193.               REM: WILL DETECT IF DISK IS NOT READY, NOT AVAILABLE,
  3194.               REM: OR PATH WAS BAD.
  3195.  
  3196.               SELECT CASE ERR
  3197.                  CASE 71
  3198.                     E$ = "DISK NOT READY"
  3199.                  CASE 68
  3200.                     E$ = "DISK NOT AVAILABLE"
  3201.                  CASE 76
  3202.                     E$ = "PATH NOT FOUND"
  3203.                  CASE ELSE
  3204.                     E$ = "UN-IDENTIFIED DISK ERROR"
  3205.               END SELECT
  3206.  
  3207.               REM: FOLLOWING MUST BE ON ONE LINE
  3208.  
  3209.               CALL GETANS("DISK ERROR: " + E$ + " Press any key.."
  3210.               ,"", "",100 ,100, 143, 1)
  3211.  
  3212.               RESUME START
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.                                   46                                  
  3232.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.                      ****  KEYBOARD AND MOUSE ROUTINES ****
  3242.  
  3243.          Adding the ability to "read the mouse" these routines provide
  3244.          increased flexibility over BASIC's INKEY$ statement.
  3245.  
  3246.          NOTE: THESE ARE ASSEMBLY ROUTINES.   ALWAYS PLACE THEM IN
  3247.                DECLARE STATEMENTS IN ANY MODULE WHICH USES THEM.  THIS
  3248.                WILL ASSURE ARGUMENT MATCHING AND PREVENT ACCIDENTAL
  3249.                PROGRAM "CRASHES".
  3250.  
  3251.          7.00 KEYMOUSE%
  3252.  
  3253.               Description: KEYMOUSE% is a function.  It pauses program
  3254.               execution.  Upon keyboard or mouse input the program
  3255.               resumes with the appropriate code returned in KEYMOUSE%.
  3256.               The mouse buttons are user defineable via the procedure
  3257.               MBUTTONS.  Mouse movement emulates the arrow keys.  Up,
  3258.               down, left, and right mouse movement places the same
  3259.               value in KEYMOUSE% as the corresponding arrow key.  If
  3260.               the key or mouse button pressed produces a standard
  3261.               ASCII/IBM character, the code for the character ( 1 to
  3262.               255 ) is returned in KEYMOUSE%.   If the key pressed, or
  3263.               mouse movement, produces an extended scan code such as
  3264.               the up arrow, the extended scan code for the key
  3265.               multiplied by 256 is returned in KEYMOUSE%.  KEYMOUSE%
  3266.               returns  18432 ( 72 * 256 ) for the up arrow.  For those
  3267.               keys which produce an extended scan code over 127, such
  3268.               as CTRL-PGUP ( 129 ), KEYMOUSE% returns a negative
  3269.               value.  SEE THE KEYMOUSE CODE CHART IN THE APPENDIX.
  3270.  
  3271.               NOTE: THIS IS AN ASSEMBLY ROUTINE.  ALWAYS INCLUDE THE
  3272.               DECLARE STATEMENT FOR THIS FUNCTION IN ANY MODULE USING
  3273.               SAME.
  3274.               -------------------------------------------------------
  3275.               'EXAMPLE: WAITS FOR RETURN, "A", DOWN ARROW, OR END.
  3276.               'PRESS END TO END
  3277.                DECLARE FUNCTION KEYMOUSE%
  3278.  
  3279.               INPT:
  3280.               A% = KEYMOUSE%        ' PROGRAM WAITS FOR INPUT HERE
  3281.               SELECT CASE A%
  3282.                  CASE 13            ' 13 IS ASCII FOR THE RETURN KEY
  3283.                    PRINT "RETURN"
  3284.                  CASE 65            ' 65 IS ASCII FOR "A"
  3285.                    PRINT "A"
  3286.                  CASE 80 * 256          ' 80 IS THE EXTENDED SCAN
  3287.                    PRINT "DOWN ARROW"   ' CODE FOR THE DOWN ARROW.
  3288.                  CASE 79 * 256          ' 79 IS THE EXTENDED SCAN
  3289.                    PRINT "END"          ' FOR END.
  3290.                    END
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.                                   47                                  
  3298.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.                  CASE ELSE
  3307.                    GOTO INPT
  3308.               END SELECT
  3309.               GOTO INPT
  3310.               --------------------------------------------------------
  3311.  
  3312.          7.01 MBUTTONS% ( LBUTTON%, RBUTTON%)
  3313.  
  3314.               Description:  Sets the values which will be placed in
  3315.               function KEYMOUSE% for the left and right mouse buttons.
  3316.  
  3317.               Arguments: LBUTTON% sets the value which will be
  3318.               returned in function KEYMOUSE% when te left mouse button
  3319.               is pressed. It may range from 0 to 255.  If LBUTTON% is
  3320.               greater than 255 it is converted to LBUTTON% AND 255
  3321.  
  3322.                          RBUTTON% sets the value which will be
  3323.               returned in function KEYMOUSE% when te right mouse
  3324.               button is pressed. It may range from 0 to 255.  If
  3325.               RBUTTON% is greater than 255 it is converted to
  3326.               LBUTTON% and 255.
  3327.               --------------------------------------------------------
  3328.               ' EXAMPLE: SETS THE LEFT MOUSE BUTTON TO "RETURN" AND
  3329.               ' THE RIGHT MOUSE BUTTON TO "ESC". 13 IS THE ASCII CODE
  3330.               ' FOR "RETURN".  27 IS THE ASCII CODE FOR "ESC".
  3331.  
  3332.               DECLARE SUB MBUTTONS ( LBUTTON%, RBUTTON% )
  3333.  
  3334.               CALL MBUTTON ( 13, 27 )
  3335.               --------------------------------------------------------
  3336.  
  3337.          7.02 MOUSEON (ISON%)
  3338.  
  3339.               Description: Sets the mouse status.
  3340.  
  3341.               Arguments: ISON% sets the mouse status as follows:
  3342.  
  3343.               If ISON% = 0 the mouse is off.
  3344.               If ISON% = 1 the mouse is on.
  3345.               If ISON% = 2 the mouse buttons remain active
  3346.               but mouse movement detection is disabled.
  3347.  
  3348.               Any other value for ISON% sets the mouse to on.
  3349.          -------------------------------------------------------------
  3350.  
  3351.          8.00 DOSOUND
  3352.  
  3353.               Description:  Makes the default sound ,or sound as
  3354.               specified by a previous call to SETWIND.
  3355.  
  3356.               Arguments:    None.
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.                                   48                                  
  3364.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.                          PROGRAM FORMAT FOR WINDOWS R-E-Z
  3375.  
  3376.           ** NOTE: ALL NUMERIC VALUES MUST BE INTEGERS FOR ALL **
  3377.              PROCEDURES EXCEPT DISKSIZE. ( EX: A%, B%, DEFINT A-F )
  3378.  
  3379.               1. LOAD QUICKBASIC WITH CORRECT LIBRARY.
  3380.  
  3381.                  - UNENHANCED VERSION:
  3382.  
  3383.                  EX: QB/L QB4UNEN.QLB  ( QB 4.00, 4.00b, 4.50 )
  3384.                      QBX/L PDSUNEN.QLB  ( BASIC 7.0, 7.1 - PDS )
  3385.  
  3386.                  - ENHANCED VERSION:
  3387.  
  3388.                  EX: QB/L QB4ALL.QLB  ( QB 4.00, 4.00b, 4.50 )
  3389.                      QBX/L PDSALL70.QLB  ( BASIC 7.0 - PDS )
  3390.                      QBX/L PDSALL71.QLB  ( BASIC 7.1 - PDS )
  3391.  
  3392.               2. DECLARE ALL SUB-ROUTINES.  THIS EXAMPLE USES THE
  3393.                  INCLUDE FILE ( DECLARE.INC ) CONTAINED IN THE
  3394.                  ENHANCED VERSION OF WINDOWS R-E-Z.
  3395.  
  3396.                  REM $INCLUDE: 'DECLARE.INC'
  3397.  
  3398.              ' 3. CALL SETWIND TO INITIALIZE WINDOW MEMORY, TURN
  3399.              '    THE MOUSE ON AND SET MOUSE KEYS.
  3400.  
  3401.                  CALL SETWIND(1,1,7,0,1,1)   'FAST WINDOWS
  3402.                                              'SOUND DEFAULTS TO "CLICK"
  3403.                                              'SHADOW COLOR = GRAY
  3404.                                              'HIGH INTENSITY IS OK
  3405.                                              'PERIOD AS DECIMAL POINT
  3406.                                              'SCROLL ARROW DISPLAYED
  3407.  
  3408.                  CALL MOUSEON (1)            'MOUSE IS ON
  3409.                  CALL MBUTTONS (13,27)       'LEFT BUTTON = ENTER
  3410.                                              'RIGHT BUTTON = ESC
  3411.  
  3412.              ' 4. CALL SETPULL IF PULLDOWN WINDOWS ARE USED
  3413.  
  3414.                  BAR$ = "THIS IS A SAMPLE"         ' DEFINE MENUBAR
  3415.                  A%= 25
  3416.                  DIM PWIND$(A%)                     ' SET TEMPORARY
  3417.                                                    ' ARRAY
  3418.                  TEMP%=0
  3419.                  WHILE PWIND$(TEMP%) <> "ENDPULL"
  3420.                     TEMP% = TEMP% + 1              ' ALWAYS START AT 1
  3421.                     READ PWIND$(TEMP%)             ' READ DATA FOR
  3422.                  WEND                              ' PULLDOWN WINDOWS.
  3423.  
  3424.                  CALL SETPULL (BAR$, PWIND$())     ' CALL SETPULL
  3425.                  ERASE PWIND$                      ' AND ERASE ARRAY
  3426.  
  3427.  
  3428.  
  3429.                                   49                                  
  3430.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.                  ' PULLDOWN WINDOW DATA
  3440.                  DATA HELLO,JOE,***
  3441.                  DATA HOW,ARE,YOU,***
  3442.                  DATA I,AM,FINE,***
  3443.                  DATA BYE,***
  3444.                  DATA ENDPULL
  3445.  
  3446.                  ON KEY(1) GOSUB PULL              ' MAKE THE F1 KEY
  3447.                                                    ' THE "HOT" KEY FOR
  3448.                                                    ' PULLDOWN WINDOWS
  3449.  
  3450.               '5. READ DATA FOR SCROLL WINDOW(S)
  3451.  
  3452.                  DIM LIST$(10)                     ' DIMENSION ARRAY
  3453.                  FOR X%= 1 TO 10                   ' AND READ SCROLL
  3454.                   READ LIST$(X%)                   ' WINDOW DATA
  3455.                  NEXT
  3456.  
  3457.                  DATA ONE, TWO, THREE, FOUR, FIVE  ' DATA FOR A SCROLL
  3458.                  DATA SIX, SEVEN, EIGHT, NINE, TEN ' WINDOW
  3459.  
  3460.  
  3461.               '6. READ DATA FOR MULTI-FIELD INPUT SCREEN(S)
  3462.  
  3463.                  A%=20
  3464.                  B%=3
  3465.                  DIM INPT%(A%),INPT$(B%)         ' TEMPORARY ARRAYS
  3466.  
  3467.                  TEMP% = 1                       ' ALWAYS START AT 1
  3468.                  FLD%=1
  3469.                  DO
  3470.                    READ INPT%(TEMP%)             ' READ CODE%.
  3471.                                                  ' IF CODE%=9999 DONE.
  3472.                    IF INPT%(TEMP%)=9999 THEN EXIT DO
  3473.                    TEMP%=TEMP%+1
  3474.                    FOR X%=1 TO 5                 ' READ REMAINING 5
  3475.                      READ INPT%(TEMP%)           ' NUMERIC VALUES IN
  3476.                                                  ' INPT%().
  3477.                      TEMP% = TEMP% + 1
  3478.                    NEXT
  3479.                    READ INPT$(FLD%)               ' READ FIELD DATA IN
  3480.                    FLD%=FLD%+1                    ' INPT$() - RESTRICT
  3481.                  LOOP                             ' DATA.
  3482.  
  3483.  
  3484.                  ' MULTI- FIELD INPUT DATA
  3485.  
  3486.                  DATA 0,1,1,15,7,99,""
  3487.                  DATA 11007,3,1,40,7,99,""
  3488.                  DATA 108,5,1,10,32,99,""
  3489.                  DATA 9999
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.                                   50                                  
  3496.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.                  CALL SETINPT( 1, 80, "12", INPT%(), INPT$(),0 ) ' SET INPUT
  3506.                                                                  ' SCREEN.
  3507.  
  3508.                  ERASE INPT%,INPT$             ' GET THE MEMORY BACK
  3509.  
  3510.              '7. ENTER THE PROGRAM
  3511.  
  3512.                  MAIN:
  3513.                  KEY (1) ON                 ' TURN ON "HOT" KEY AT
  3514.               '  .                          ' APPROPRIATE SPOT IN
  3515.               '  .                          ' PROGRAM.
  3516.               '  .                          ' WAIT FOR F1 KEY.
  3517.                  GOTO MAIN
  3518.  
  3519.                  REM  PULL IS A SUB ROUTINE WHICH IS ENTERED VIA THE
  3520.                  REM  F1 KEY BEING PRESSED.  THIS SUB DISPLAYS THE
  3521.                  REM  PULLDOWN WINDOW AND WAITS FOR AN ITEM TO BE
  3522.                  REM  SELECTED FROM SAME.  IF THE ESC KEY IS PRESSED
  3523.                  REM  THE PROGRAM RESUMES EXECUTION WHERE IT WAS
  3524.                  REM  INTERRUPTED BY THE F1 KEY.  IF AN ITEM IS
  3525.                  REM  SELECTED A ROUTINE IS EXECUTED.  AFTER EXECUT-
  3526.                  REM  ION THE PROGRAM CONTINUES AT MAIN.
  3527.                  REM  THIS IS A SUGGESTION FOR A METHOD TO USE PULL-
  3528.                  REM  DOWN WINDOWS.  ALTERNATE METHODS MAY BE USED,
  3529.                  REM  SUCH AS CALL "PULLDOWN" AT START OF PROGRAM.
  3530.                  REM  AND NOT USING A HOT KEY.
  3531.  
  3532.                  PULL:
  3533.                  KEY (1) OFF
  3534.                  CALL PULLDOWN (MENUITEM% , WINDITEM%, 112, 0, 11)
  3535.  
  3536.                  SELECT CASE MENUITEM%
  3537.  
  3538.                   CASE 1                      ' MENUBAR ITEM = THIS
  3539.                     SELECT CASE WINDITEM%
  3540.                       CASE 1                  ' HELLO
  3541.                '       .                      ' ROUTINE FOR HELLO
  3542.                '       .
  3543.                       CASE 2                  ' JOE
  3544.                '       .                      ' ROUTINE FOR JOE
  3545.                '       .
  3546.                     END SELECT
  3547.  
  3548.                   CASE 2                      ' MENUBAR ITEM = IS
  3549.                     SELECT CASE WINDITEM%
  3550.                       CASE 1                  ' HOW
  3551.                 '      .                      ' ROUTINE FOR HOW
  3552.                 '      .
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.                                   51                                  
  3562.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.                       CASE 2                  ' ARE
  3571.                 '      .                      ' ROUTINE FOR ARE
  3572.                 '      .
  3573.                       CASE 3                  ' YOU
  3574.                 '      .                      ' ROUTINE FOR YOU
  3575.                 '      .
  3576.                     END SELECT
  3577.  
  3578.                   CASE 3                      ' MENUBAR ITEM = A
  3579.                     SELECT CASE WINDITEM%
  3580.                       CASE 1                  ' I
  3581.                 '      .                      ' ROUTINE FOR I
  3582.                 '      .
  3583.                       CASE 2                  ' AM
  3584.                 '      .                      ' ROUTINE FOR AM
  3585.                 '      .
  3586.                       CASE 3                  ' FINE
  3587.                 '      .                      ' ROUTINE FOR FINE
  3588.                 '      .
  3589.                     END SELECT
  3590.  
  3591.                   CASE 4                      ' MENUBAR ITEM = SAMPLE
  3592.                 '      .                      ' ROUTINE FOR SAMPLE
  3593.                 '      .                      ' ( OR BYE )
  3594.  
  3595.                   CASE ELSE                   ' MUST BE THE ESC
  3596.                     KEY (1) ON                ' KEY
  3597.                     RETURN MAIN
  3598.  
  3599.                  END SELECT
  3600.                     KEY (1) ON
  3601.                     RETURN MAIN                ' DONE WITH THE ROUTINE
  3602.                                                ' SELECTED FROM
  3603.                                                ' PULLDOWN WINDOWS
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.                                   52                                  
  3628.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.                         MAKING A CUSTOMIZED LIBRARY
  3638.                          ( Enhanced version only )
  3639.  
  3640.               Users familiar with LINK and LIB utilities may prefer to
  3641.           create libraries outside of QuickBASIC's environment using
  3642.           the appropriate object files.  As individual assembly object
  3643.           files can be linked together to create smaller libraries
  3644.           this is the preferable method.  See the section "FILES" for
  3645.           a description of all files.
  3646.               The libraries ( QB4ALL.QLB, PDSALL70.QLB, PDSALL71.QLB,
  3647.           QB4ALL.LIB, PDSALL70.LIB and PDSALL71.LIB ) are complete and
  3648.           contain all of the procedures in WINDOWS R-E-Z.  If all of
  3649.           the procedures are not required in your program customized
  3650.           libraries using less memory may be made in the QuickBASIC
  3651.           environment as follows:
  3652.  
  3653.           For QB 4.00 and 4.00b:
  3654.  
  3655.           1. Load QuickBASIC using the command QB/L QB4ASM.  The file,
  3656.              QB4ASM.QLB, contains the assembly routines required by
  3657.              all of the other procedures.
  3658.  
  3659.           2. Load the modules  WIND_REZ.BAS and QB4MEM.BAS. ALL
  3660.              PROCEDURES EXCEPT THOSE IN DIRWIND.BAS REQUIRE THESE
  3661.              MODULES.  They contain the basic windowing routines.  If
  3662.              this is all your program requires select the Make library
  3663.              option from the Run menu in QuickBASIC (see your manual)
  3664.              to make the library. ( QB4ASM.LIB must be present.)
  3665.  
  3666.           3. Load any other modules your program requires.  IF YOU
  3667.              WANT TO USE PULLDOWN WINDOWS THE MODULES PULLDOWN.BAS
  3668.              AND SCROLL.BAS MUST BOTH BE LOADED.  All other
  3669.              modules may be loaded independent of each other.
  3670.              When all of the modules you will be using are loaded
  3671.              make the library as in step 2.
  3672.  
  3673.           Two libraries will be produced.  The library with the suffix
  3674.           .QLB is used in the QuickBASIC environment and the library
  3675.           with the suffix .LIB must be available to produce an
  3676.           executable file.  To use your new library ( assuming a name
  3677.           of NEWLIB.QLB ) exit QuickBASIC and reload with the command
  3678.           QB/L NEWLIB.
  3679.  
  3680.           For QuickBASIC version 4.50 and BASIC 7.+ ( PDS );
  3681.  
  3682.           Versions 4.5 of QuickBasic and BASIC 7.0+ ( PDS ) do not use
  3683.           the "full library" mode while linking.  Therefore it is not
  3684.           nesessary to build a customized library or link outside of
  3685.           the QuickBASIC environment to produce the smallest possible
  3686.           executable programs.
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.                                   53                                  
  3694.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.                                      FILES
  3704.  
  3705.               The following files are included with WINDOWS R-E-Z.
  3706.           Files starting with "QB4" are for use with QB 4.00, QB 4.00b
  3707.           and QB 4.50. These files are not included with WINDOWS R-E-Z
  3708.           for BASIC 7.+ ( PDS ).  Files starting with "PDS" are for
  3709.           use with BASIC 7.+, ( PDS ) These files are not included
  3710.           with WINDOWS R-E-Z for QB 4.+.
  3711.  
  3712.           Library Files:
  3713.  
  3714.           - Library consisting of all assembly procedures.
  3715.  
  3716.            *  QB4ASM.LIB --  For QuickBASIC 4.+
  3717.            *  PDSASM.LIB --  For BASIC 7.+
  3718.  
  3719.           - QuickBASIC version of QB4ASM.LIB or PDSASM.LIB
  3720.  
  3721.            *  QB4ASM.QLB --  For QuickBASIC 4.+
  3722.            *  PDSASM.QLB --  For BASIC 7.+
  3723.  
  3724.           - Library consisting of all assembly and BASIC procedures.
  3725.  
  3726.            *  QB4ALL.LIB --- For QuickBASIC 4.+
  3727.            *  PDSALL70.LIB - For Basic 7.0
  3728.            *  PDSALL71.LIB - For Basic 7.1
  3729.           **  QB4UNEN.LIB -- For QuickBASIC 4.+  ( unenhanced )
  3730.           **  PDSUNEN.LIB -- For BASIC 7.+       ( unenhanced )
  3731.  
  3732.           - QuickBASIC version of QB4ALL.LIB, PDSALL70.QLB or
  3733.             PDSALL71.QLB.
  3734.  
  3735.            *  QB4ALL.QLB --- For QuickBASIC 4.+
  3736.            *  PDSALL70.QLB - For BASIC 7.0
  3737.            *  PDSALL71.QLB - For BASIC 7.1
  3738.           **  QB4UNEN.QLB -- For QuickBASIC 4.+  ( unenhanced )
  3739.           **  PDSUNEN.QLB -- For BASIC 7.+       ( unenhanced )
  3740.  
  3741.           - Library of all assembly and BASIC procedures without
  3742.             error detection or window status.  Program MUST be
  3743.             completely "debugged" before these are used.
  3744.  
  3745.            *  QB4NER.LIB --- For QuickBASIC 4.+
  3746.            *  PDSNER70.LIB - For BASIC 7.0
  3747.            *  PDSNER71.LIB - For BASIC 7.1
  3748.  
  3749.           - QuickBASIC version of QB4NER.LIB, PDSNER70.LIB or
  3750.             PDSNER71.LIB.
  3751.  
  3752.            *  QB4NER.QLB --- For QuickBASIC 4.+
  3753.            *  PDSNER70.QLB - For BASIC 7.0
  3754.            *  PDSNER71.QLB - For BASIC 7.1
  3755.  
  3756.  
  3757.  
  3758.  
  3759.                                   54                                  
  3760.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.           Object Files:
  3770.  
  3771.            *  QB4WIND.OBJ -- Object file of assembly windowing
  3772.            *  PDSWIND.OBJ    routines.
  3773.            *  QB4INPT.OBJ -- Object file of assembly input routines.
  3774.            *  PDSINPT.OBJ    "                                    "
  3775.            *  QB4INPT2.OBJ   "                                    "
  3776.            *  PDSINPT2.OBJ   "                                    "
  3777.            *  QB4DIR.OBJ --- Object file of assembly directory
  3778.            *  PDSDIR.OBJ     routines.
  3779.            *  QB4SCRL.OBJ -- Object file of assembly scroll routines.
  3780.            *  PDSSCRL.OBJ    "                                    "
  3781.            *  PDSMEM70.OBJ -- Alternate memory management module.
  3782.            *  PDSMEM71.OBJ -- "                                 "
  3783.  
  3784.           Basic Files:
  3785.  
  3786.               DEMO.BAS ----- Source code for demonstration program.
  3787.            *  INPTWIND.BAS - BASIC source code for routines in
  3788.            *  PULLDOWN.BAS   WINDOWS R-E-Z.
  3789.            *  SCROLL.BAS           "
  3790.            *  WIND_REZ.BAS         "
  3791.            *  DIRWIND.BAS          "
  3792.            *  QB4MEM.BAS                        ( QuickBASIC 4.+ )
  3793.            *  PDSMEM.BAS                        ( BASIC 7.+ )
  3794.               MULTSAM1.BAS   Sample multi-field input program
  3795.               MULTSAM2.BAS         "
  3796.               MULTSAM3.BAS         "
  3797.  
  3798.            NOTE:  All BASIC files except QB4MEM.BAS and PDSMEM.BAS are
  3799.                   the same for QuickBASIC 4.+  and  BASIC 7.0/7.1. All
  3800.                   basic routines, except those in DIRWIND.BAS, require
  3801.                   the presence of the module WIND_REZ.BAS.
  3802.  
  3803.           Other Files:
  3804.  
  3805.               WIND_REZ.DOC - This document.
  3806.               PRNT.BAT ----- Batch file for printing WIND_REZ.DOC.
  3807.               LAZPRNT.BAT -- Batch file for printing WIND_REZ.DOC on a
  3808.                              HP compatible lazer printer.
  3809.               DECLARE.INC -- INCLUDE file containing DECLARE
  3810.                              statements for all routines.
  3811.               ORDER.ME ----- Order form for WINDOWS R-E-Z.
  3812.               READ.ME  ----- Update information.
  3813.            *  QUICKREF.DOC - Quick reference guide.
  3814.            *  PRNT2.BAT ---- Batch file for printing QUICKREF.DOC.
  3815.            *  LAZRRNT2.BAT - Batch file for printing QUICKREF.DOC on a
  3816.                              HP compatible lazer printer.
  3817.  
  3818.  
  3819.  
  3820.            * Not included with the unenhanced version of WINDOWS R-E-Z.
  3821.           ** Not included with the enhanced version of WINDOWS R-E-Z.
  3822.  
  3823.  
  3824.  
  3825.                                   55                                  
  3826.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.                                      Errors
  3836.  
  3837.               The following is a listing of the errors WINDOWS R-E-Z
  3838.           will detect.
  3839.  
  3840.           ERROR #       DESCRIPTION
  3841.           ------------------------------------------------------------
  3842.  
  3843.           ERROR 0       There is no active window.  SCRLWIND, RESAVE
  3844.                         CLRWIND, PRINTW, LINEW, and NEWCOLOR require
  3845.                         an active window.
  3846.  
  3847.           ERROR 1       SETWIND has not been called to initialize
  3848.                         window memory.  This error will be reported if
  3849.                         the program uses a CLEAR statement and SETWIND
  3850.                         has not be called to re-initialize window
  3851.                         memory.
  3852.  
  3853.           ERROR 2       A window number has been specified which is
  3854.                         out of range for the calling routine.  Window
  3855.                         number 20 is the maximum window number for all
  3856.                         routines.  Window number 1 is the minimim
  3857.                         window number for SAVEWIND, DELWIND, and
  3858.                         RSTRWIND.  Window number 0 is the minimum
  3859.                         window number for MAKEWIND and CHNGWIND.
  3860.  
  3861.           ERROR 3       The shadow, specified in a call to MAKEWIND,
  3862.                         will not fit on the screen.  If this error is
  3863.                         displayed the window will fit on the screen
  3864.                         but the shadow will not.
  3865.  
  3866.           ERROR 4       The window will not fit on the screen.  The
  3867.                         left column plus the window's width makes the
  3868.                         window too wide or the top row plus the number
  3869.                         of rows makes the window too tall.  The left
  3870.                         column and top row must be greater than 0.
  3871.                         GETANS makes a window with a width predicated
  3872.                         on the width of the prompt.  INPTWIND makes a
  3873.                         window with a width based on the length of the
  3874.                         prompt plus the width of the input field.
  3875.                         PULLDOWN windows have a width based on the
  3876.                         longest item in the pulldown window's list.
  3877.                         This error is displayed for INPTWIND and
  3878.                         GETANS if no window is specified ( BORDER%=0 )
  3879.                         and the width of the prompt and/or field will
  3880.                         not fit on the screen.
  3881.  
  3882.           ERROR 5       The border designation is not valid for the
  3883.                         calling routine.  GETANS does not allow title
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.                                   56                                  
  3892.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.                         windows.  PULLDOWN does not allow title
  3901.                         windows and only allows right-bottom shadows.
  3902.                         SEE THE BORDER DESIGNATION CHART.
  3903.  
  3904.           ERROR 6       A request was made to CHNGWIND to make the
  3905.                         active window a non-existent window or a
  3906.                         window saved via SAVEWIND.  The active window
  3907.                         can only be a window save by MAKEWIND.
  3908.  
  3909.           ERROR 7       A call was made to RESAVE when the active
  3910.                         window was window number 0.  RESAVE can only
  3911.                         resave active window 1 to 20.
  3912.  
  3913.           ERROR 8       An window specified in a call to MAKEWIND or
  3914.                         SAVEWIND previouly existed.  A window must be
  3915.                         deleted via a call to DELWIND or RSTRWIND
  3916.                         before the number assigened to it can be used
  3917.                         again.  This error will not be reported for
  3918.                         window number 0 as it is not saved.
  3919.  
  3920.           ERROR 11      A bad row number was specified in a call to
  3921.                         PRINTW or LINEW.  The row number must be
  3922.                         greater than 0.  PRINTW allows print on the
  3923.                         bottom border.  LINEW does not.  The string
  3924.                         specified in a call to PRINTW will not fit in
  3925.                         the window due to it's length or it's left
  3926.                         column ( start print ) position.
  3927.  
  3928.           ERROR 21      The array ( LIST$() ) in a call to SCRLWIND
  3929.                         has a lower dimension greater than 1 or an
  3930.                         upper dimension less then the number of
  3931.                         entries ( ENTRIES% ) in the list.
  3932.  
  3933.           ERROR 22      A call was made to SCRLWIND with less than one
  3934.                         entry ( ENTRIES% ).
  3935.  
  3936.           ERROR 23      A scroll window requires a minimum width of 5.
  3937.  
  3938.           ERROR 24      At least one of the strings in the list for a
  3939.                         scroll window ( SCRLWIND ) will not fit in the
  3940.                         window, allowing for a space on either side of
  3941.                         the string.
  3942.  
  3943.           ERROR 31      The menubar string specified in a call to
  3944.                         SETPULL is missing or has the wrong format.
  3945.  
  3946.           ERROR 32      The menubar string specified in a call to
  3947.                         SETPULL has over 10 items in it.  A space
  3948.                         between two characters is the separator for
  3949.                         the items.
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.  
  3957.                                   57                                  
  3958.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.           ERROR 33      The data supplied to SETPULL is in the wrong
  3968.                         format.  The end of each pulldown window must
  3969.                         be represented by "***" in the data stream.
  3970.                         The end for all pulldown windows must be
  3971.                         represented by "ENDPULL".  A pulldown window
  3972.                         entry is a null string.
  3973.  
  3974.           ERROR 34      Over 20 items are requested for an individual
  3975.                         pulldown window. This may occur if a pulldown
  3976.                         window separator ("***") is missing.
  3977.  
  3978.           ERROR 35      There are no items in a pulldown window.  Two
  3979.                         consecutive "***"'s may be in the data stream.
  3980.  
  3981.           ERROR 36      The menubar has less than 2 items in it.
  3982.                         There must be spaces between the items.
  3983.  
  3984.           ERROR 41      The requested width of in input field in
  3985.                         INPTWIND is out of range.  The maximum width
  3986.                         is 15 for numeric fields, the screens width
  3987.                         minus 4 for windowed ALPHA/NUMERIC fields or
  3988.                         the screens width minus 1 for un-windowed
  3989.                         ALPHA/NUMERIC fields.  The minimum width for a
  3990.                         numeric field is the number of decimal places
  3991.                         plus one.  The minimum width for an ALPHA-
  3992.                         NUMERIC field is 1.  A date field must have a
  3993.                         width of 8 or 10.
  3994.  
  3995.           ERROR 42      The field code in INPTWIND does not consist of
  3996.                         legal characters. ("0","1","2","3","4","5","6",
  3997.                          "A","L","U","D","P0","P1","P2","P3","P4","P5,
  3998.                         or "P6 )
  3999.  
  4000.           ERROR 51      The screen number in MULTINPT is less than one
  4001.                         or over 10.
  4002.  
  4003.           ERROR 52      The array ( RTRN$() ) specified in a call to
  4004.                         MULTINPT has a lower dimension of greater than
  4005.                         one or an upper dimension less than the number
  4006.                         of fields in the multi-field input screen.
  4007.  
  4008.           ERROR 53      The screen number in a call to MULTINPT was
  4009.                         not defined via a call to SETINPT.
  4010.  
  4011.           ERROR 54      The field number specified in call to MULTINPT
  4012.                         is greater than the number of fields in the
  4013.                         multi-field input screen or less than one.
  4014.                         The auto-exit field is greater than the number
  4015.                         of fields in the multi-field input screen or
  4016.                         less than 0.
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.                                   58                                  
  4024.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.           ERROR 55      The screen width when MULTINPT was called was
  4034.                         not the same as specified when the multi-field
  4035.                         input screen was defined by SETINPT.
  4036.  
  4037.           ERROR 61      The screen number in a call to SETINPT is less
  4038.                         than one or greater than 10.
  4039.  
  4040.           ERROR 62      The screen width in a call to SETINPT is not
  4041.                         80 or 40.
  4042.  
  4043.           ERROR 63      The exit string ( EXIT$ ) in a call to SETINPT
  4044.                         is null or contains an illegal character.
  4045.                         Legal character are:  "1234567890UD".
  4046.  
  4047.           ERROR 64      The input data ( INPT%(), INPUT$() ) is not in
  4048.                         the correct format in a call to SETWIND.
  4049.  
  4050.           ERROR 65      Over 100 fields were defined in a call to
  4051.                         SETINPT.
  4052.  
  4053.           ERROR 66      Less than 2 fields were defined in a call to
  4054.                         SETINPT.
  4055.  
  4056.           ERROR 67      At least one field in a call to SETINPT has an
  4057.                         illegal field code.  SEE THE MULTI-FIELD CODE
  4058.                         CHART.
  4059.  
  4060.           ERROR 68      The field width is not appropriate for the
  4061.                         type of field specified in a call to SETINPT.
  4062.  
  4063.           ERROR 69      The left position plus the width of a field
  4064.                         defined in a call to SETINPT will not allow
  4065.                         the field to fit on the screen.  The row or
  4066.                         column position is less than one.  The row
  4067.                         position of a field is greater than 26.
  4068.  
  4069.           ERROR 70      All fields defined in a call to SETINPT are
  4070.                         protected fields.  No input is possible.
  4071.  
  4072.           ERROR 71      The cumulative total of restrict characters
  4073.                         for all fields for a multi-field input screen
  4074.                         defined via SETINPT is greater than 1023.
  4075.  
  4076.           ERROR 72      The number of characters in a restrict string
  4077.                         ( INPT$() ) for an individual field defined
  4078.                         in a call to SETINPT is greater than 255.
  4079.  
  4080.           ERROR 73      The array ( INPT$() ) in SETINPT, which
  4081.                         defines the field's restrict strings is
  4082.                         dimensioned less than the number of fields or
  4083.                         has a lower dimension graeter than one.
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.                                   59                                  
  4090.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.                                    APPENDIX I
  4100.  
  4101.                                Color Attribute Chart
  4102.  
  4103.           ATTRIBUTE                 BACKGROUND              FOREGROUND
  4104.  
  4105.           START     END
  4106.  
  4107.           0  ------ 15               BLACK                  NORMAL
  4108.           16 ------ 31               BLUE                   NORMAL
  4109.           32 ------ 47               GREEN                  NORMAL
  4110.           48 ------ 63               CYAN                   NORMAL
  4111.           64 ------ 79               RED                    NORMAL
  4112.           80 ------ 95               MAGENTA                NORMAL
  4113.           96 ------ 111              BROWN                  NORMAL
  4114.           112 ----- 127              LIGHT GRAY             NORMAL
  4115.           128 ----- 143              BLACK                  FLASHING
  4116.           144 ----- 159              BLUE                   FLASHING
  4117.           160 ----- 175              GREEN                  FLASHING
  4118.           176 ----- 191              CYAN                   FLASHING
  4119.           192 ----- 207              RED                    FLASHING
  4120.           208 ----- 223              MAGENTA                FLASHING
  4121.           224 ----- 239              BROWN                  FLASHING
  4122.           240 ----- 255              LIGHT GRAY             FLASHING
  4123.           -----------------------------------------------------------
  4124.           OFFSET FROM START                                 FOREGROUND
  4125.  
  4126.           0                                                 BLACK
  4127.           1                                                 BLUE
  4128.           2                                                 GREEN
  4129.           3                                                 CYAN
  4130.           4                                                 RED
  4131.           5                                                 MAGENTA
  4132.           6                                                 BROWN
  4133.           7                                                 LIGHT GRAY
  4134.           8                                                 DARK GRAY
  4135.           9                                                 LIGHT BLUE
  4136.           10                                                LIGHT GREEN
  4137.           11                                                LIGHT CYAN
  4138.           12                                                LIGHT RED
  4139.           13                                                LIGHT MAGENTA
  4140.           14                                                YELLOW
  4141.           15                                                WHITE
  4142.  
  4143.  
  4144.           EXAMPLE: If the attribute = 242 then the background color is
  4145.                    light gray and the foreground flashes.  The offset
  4146.                    from start = 242 - 240 or 2, so the foreground color
  4147.                    is green.
  4148.  
  4149.           NOTE: GETANS and SCRLWIND allow a flashing border only.
  4150.           CHNGPULL, PULLDOWN, AND MULTINPT will not allow a flashing
  4151.           border or text.
  4152.  
  4153.  
  4154.  
  4155.                                   60                                  
  4156.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.                                    APPENDIX II
  4166.  
  4167.                              Multi-field code chart
  4168.  
  4169.  
  4170.           The code for each field can be up to five digits long.  The
  4171.           digits are numbered 5,4,3,2 and 1, with 1 being the least
  4172.           significant digit and 5 the most significant digit.
  4173.  
  4174.           DIGIT NUMBER -------  5  4  3  2  1
  4175.  
  4176.           EXAMPLE CODE% ------  2  1  0  1  6
  4177.  
  4178.           - Digits 1 and 2 set the field type and can be:
  4179.  
  4180.           00  ------ Numeric - no decimal places.
  4181.           01 to 06 - Numeric - 1 to 6 decimal places
  4182.  
  4183.           10 ------- Numeric - no decimal places - padded with leading
  4184.                      zeros.
  4185.           11 to 16 - Numeric - 1 to 6 decimal places - padded with
  4186.                      leading zeros.
  4187.  
  4188.           07 ------- Alpha/numeric
  4189.           17 ------- Alpha/numeric -- UPPER CASE
  4190.           27 ------- Alpha/numeric -- lower case
  4191.  
  4192.           08 ------- Date
  4193.  
  4194.           - Digit 3 sets a protected field ( No entry ) and can be:
  4195.  
  4196.           0 -------- Field is NOT protected.
  4197.           1 -------- Field is protected.
  4198.  
  4199.           - Digit 4 sets an Auto-advance field and can be:
  4200.  
  4201.           0 -------- Field is NOT Auto-advance.
  4202.           1 -------- Field is Auto-advance.
  4203.  
  4204.           - Digit ---- 5 sets an Auto-exit field and can be:
  4205.  
  4206.           0 -------- Field is NOT Auto-exit.
  4207.           1 -------- Field is Auto-exit. ( Always )
  4208.           2 -------- Field is Auto-exit. ( On change only )
  4209.           3 -------- Field is Fixed-choice. ( auto-exit - always )
  4210.  
  4211.           EXAMPLE: IF CODE% = 21016 the field is decimal with padded
  4212.                    zero's, Auto-advance, and Auto-exit ( on change ).
  4213.  
  4214.           NOTE: If digit 3 is set to 1 (protected) digits 4 and 5 are
  4215.                 ignored .
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.                                   61                                  
  4222.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.                                   APPENDIX III
  4232.                                Border Designations
  4233.  
  4234.         DIGIT NUMBER         3    2    1
  4235.         EXAMPLE BORDER%      1    2    1       ( 121 )
  4236.  
  4237.         Digit 1 = Border     Digit 2 = Shadow   Digit 3 = Title Box
  4238.  
  4239.         Example (121) = title box/ left bottom shadow/ single line border
  4240.         ------------------------------------------------------------------
  4241.                     :---Border---:          :------- Shadow -----------:
  4242.           Border    Single  Double   Title  Right   Left    Left  Right
  4243.           Value     Line    Line     Box    Bottom  Bottom  Top   Top
  4244.  
  4245.               0            No border, title box, or shadow
  4246.               1     X
  4247.               2             X
  4248.              10                              X
  4249.              11     X                        X
  4250.              12             X                X
  4251.              20                                     X
  4252.              21     X                               X
  4253.              22             X                       X
  4254.              30                                             X
  4255.              31     X                                       X
  4256.              32             X                               X
  4257.              40                                                    X
  4258.              41     X                                              X
  4259.              42             X                                      X
  4260.  
  4261.             100                       X
  4262.             101     X                 X
  4263.             102             X         X
  4264.             110                       X      X
  4265.             111     X                 X      X
  4266.             112             X         X      X
  4267.             120                       X             X
  4268.             121     X                 X             X
  4269.             122             X         X             X
  4270.             130                       X                     X
  4271.             131     X                 X                     X
  4272.             132             X         X                     X
  4273.             140                       X                            X
  4274.             141     X                 X                            X
  4275.             142             X         X                            X
  4276.           -------------------------------------------------------------------
  4277.           See individual routines for restrictions.
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.                                   62                                  
  4288.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.                                APPENDIX IV
  4298.  
  4299.                            KEYMOUSE CODE VALUES
  4300.  
  4301.           KEYMOUSE%       Key(s)
  4302.  
  4303.           1 to 255        The equivalent key which produces the
  4304.                           corresponding ASCII/IBM code.
  4305.                           ( 65 = A, 66 = B etc. )
  4306.  
  4307.           15104          F1
  4308.           15360          F2
  4309.           15616          F3
  4310.           15872          F4
  4311.           16128          F5
  4312.           16384          F6
  4313.           16640          F7
  4314.           16896          F8
  4315.           17152          F9
  4316.           17408          F10
  4317.           18432          UP ARROW     ( MOUSE UP )
  4318.           20480          DOWN ARROW   ( MOUSE DOWN )
  4319.           19200          LEFT ARROW   ( MOUSE LEFT )
  4320.           19712          RIGHT ARROW  ( MOUSE RIGHT )
  4321.           18688          PGUP
  4322.           20736          PGDN
  4323.           18176          HOME
  4324.           20224          END
  4325.           20992          INSERT
  4326.           21248          DELETE
  4327.           29952          CTRL-END
  4328.           30464          CTRL-HOME
  4329.  
  4330.           NOTE: THIS LIST IS NOT ALL INCLUSIVE.  IT DOES PROVIDE
  4331.           VALUES FOR COMMON KEYS OR KEY COMBINATIONS.
  4332.  
  4333.           To find the values for other keys or key combinations this
  4334.           small program can be used.  Press ESC to end the program.
  4335.  
  4336.           DECLARE FUNCTION KEYMOUSE%
  4337.  
  4338.           GETKEY:
  4339.           A%= KEYMOUSE%
  4340.           PRINT A%
  4341.           IF A% <> 27 THEN GOTO GETKEY
  4342.           END
  4343.  
  4344.           As a key or key combination is pressed the corresponding
  4345.           value will print on the screen.
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.                                   63                                  
  4354.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.                                    RESTRICTIONS
  4364.  
  4365.           ------------------------------------------------------------
  4366.                                UNENHANCED LIBRARY
  4367.                                ------------------
  4368.  
  4369.                    THE UNENHANCED LIBRARY IS OFFERED ON A TRIAL BASIS.
  4370.            IT MAY BE USED FOR EVALUATION.  EXECUTABLE PROGRAMS MADE
  4371.            FROM THE UNENHANCED LIBRARY MAY NOT BE DISTRIBUTED.  IF YOU
  4372.            DECIDE THE ROUTINES ARE USEFUL, REGISTRATION MAY BE
  4373.            ACCOMPLISHED BY VIRTUE OF SECURING THE ENHANCED VERSION.
  4374.            THE UNENHANCED LIBRARY MAY NOT BE ALTERED.  THE UNENHANCED
  4375.            LIBRARY MAY BE DISTRIBUTED, PROVIDED IT IS DISTRIBUTED WITH
  4376.            ALL OF THE FILES INCLUDED IN QWEZ41.ZIP OR PWEZ41.ZIP.
  4377.                   THE FILES, QWEZ41.ZIP OR PWEZ41.ZIP , MAY BE UP-
  4378.            LOADED IN THEIR ENTIRETY TO ANY PUBLIC OR PRIVATE  BULLETIN
  4379.            BOARD.  INDIVIDUAL FILES NOT BE UP-LOADED.
  4380.           ------------------------------------------------------------
  4381.                                 ENHANCED VERSION
  4382.                                 -----------------
  4383.  
  4384.                  ALL OF THE SOURCE CODE, OBJECT CODE, AND LIBRARIES
  4385.            INCLUDED IN WINDOWS R-E-Z IS COPYRIGHTED.  COPYING AND
  4386.            DISTRIBUTING ANY OF THE MATERIAL IS PROHIBITED.  PROGRAMS
  4387.            MADE USING ANY OF THE PROCEDURES FROM WINDOWS R-E-Z IN THE
  4388.            EXECUTABLE (.EXE ) FORM MAY BE DISTRIBUTED FREELY BY
  4389.            ORIGINAL PURCHASERS.
  4390.           ------------------------------------------------------------
  4391.                                 COPYRIGHT WARNING
  4392.                                 -----------------
  4393.  
  4394.                  EXTRANEOUS CODE HAS BEEN INSERTED IN THE LIBRARY
  4395.            FILES.   ANY PROGRAM MADE USING THE LIBRARY FILES IS
  4396.            DISTINGUISHABLE AS ORIGINATING FROM WINDOWS R-E-Z. ABUSE OF
  4397.            MY COPYRIGHT PRIVILEGES WILL NOT BE AMUSING TO ME.  I WILL
  4398.            TAKE APPROPRIATE ACTION IF COPYRIGHT INFRINGEMENT IS
  4399.            DISCOVERED.
  4400.           ------------------------------------------------------------
  4401.                                    DISCLAIMER
  4402.                                    ----------
  4403.  
  4404.               ANY LOSS INCURRED FROM THE USE OF THE PROCEDURES CON-
  4405.           TAINED IN WINDOWS R-E-Z, OR ANY LOSS BELIEVED TO BE CAUSED
  4406.           FROM THE PROCEDURES CONTAINED IN WINDOWS R-E-Z IS NOT THE
  4407.           RESPONSIBILITY OF CONNECT SOFTWARE.  USERS OF WINDOWS R-E-Z
  4408.           ASSUME FULL RESPONSIBILITY FOR THE USE OF ANY PROCEDURES
  4409.           CONTAINED WITHIN.
  4410.           ------------------------------------------------------------
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.                                   64                                  
  4420.      Copyright (c) 1988 - 1991  By:CONNECT Software  All rights reserved.
  4421.  
  4422.