home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / Q4TOOL.ZIP / Q4TOOL.DOC < prev    next >
Text File  |  1990-08-19  |  39KB  |  891 lines

  1.  
  2.  
  3.                             The Q4Tool Library [Q4T]
  4.                                     Ver. 1.2
  5.                       Library Routines for QuickBASIC 4.x
  6.                         by  R. J. Crouch  -  August 1990
  7.                           Copyright - 1990 - CareWare
  8.                               All Rights Reserved
  9.                    _________________________________________
  10.  
  11.  
  12.  
  13.                       **   What is the Q4Tool Library?  **
  14.                      ======================================
  15.  
  16.  
  17.           Q4Tool  is  a  small  collection  of  innovative  and direct
  18.           programming tools, in  the  form  of  a  user  library,  for
  19.           Microsoft (R), QuickBASIC 4.xx [QB].  These library routines
  20.           are intended for use by individuals with some QB programming
  21.           experience.  The following files make up the Q4Tool Library.
  22.  
  23.             Primary:  Q4T.LIB  -  Q4T.QLB  -  Q4T.BI  -  Q4TOOL.DOC
  24.  
  25.             Support:  Q4T-DEMO.BAS  -  Q4T-DEMO.EXE  -  SHOWMENU.OBJ
  26.  
  27.           Q4Tool  [Q4T]  has  emerged  from  a  necessity for a simple
  28.           collection of comprehensive routines to supplement the BASIC
  29.           language.  All of its routines are easily incorporated  into
  30.           almost any QuickBASIC 4.xx source without greatly increasing
  31.           the efficient size of the "stand-alone" program.  The Q4Tool
  32.           Library is intended as a  solid  foundation  from  which  to
  33.           build your own personal libraries.
  34.  
  35.  
  36.  
  37.                    **   What the Q4Tool Library provides   **
  38.                   ============================================
  39.  
  40.  
  41.           Mouse Services:  Mouse*()
  42.  
  43.           A  majority  of  the  routines  in  Q4T  pertain  to   mouse
  44.           functions.   These  functions  will  allow  a  programmer to
  45.           incorporate the much needed  mouse  services  into  any  de-
  46.           manding  application.   They  are  intelligently  written to
  47.           compensate for a few idiosyncrasies that tend to emerge from
  48.           the mouse interrupt (33H).
  49.  
  50.  
  51.           Windowing:  DoWindow()
  52.  
  53.           Windowing  for  todays  applications  is  not  new, but this
  54.           windowing routine adds a few features that will enhance  any
  55.           program.   The  screen write for this routine is serviced by
  56.           machine code for  a  fast  and  clean  appearance.   Select-
  57.           ability for title location, type and location of shadow, and
  58.           a solid frame, make this windowing routine unique from other
  59.           we have seen.
  60.  
  61.  
  62.           Screen save/restore:  PutScrn()/GetScrn()
  63.  
  64.           The ability to save and later restore a screens contents are
  65.           essential  for contemporary programming.  These two routines
  66.           are designed to work within the QB environment.   They  make
  67.           use  of  QB's string descriptor block for ease of use.  This
  68.           pair of routines is written entirely  of  machine  code  for
  69.           instant results.
  70.  
  71.  
  72.           Screen print:  PrtScrn()
  73.  
  74.           This is a little machine code routine that will print to the
  75.           screen,  at the location and color desired, any string vari-
  76.           able.  It's fast, compact, and incorporates  into  just  one
  77.           CALL,  QB's  LOCATE,  COLOR,  and  PRINT  statements.   This
  78.           routine is the heart of  the  windowing  procedure  and  the
  79.           reason for its speed.
  80.  
  81.  
  82.           Screen string centering:  Ctr()
  83.  
  84.           This  is  a  handy  little  function that returns the column
  85.           position needed to center string data or  variables  on  the
  86.           screen.   It  can  easily  be  incorporated into QB's LOCATE
  87.           statement.  [i.e., LOCATE 12, Ctr(strg$)]
  88.  
  89.  
  90.           Program delays:  Delay()
  91.  
  92.           This  is  a  smart  replacement for QB's new SLEEP statement
  93.           (which, by the way, takes over 2K of executable code).   The
  94.           delay   can   either  be  forced or user bypassed  with  any
  95.           key or mouse button.
  96.  
  97.  
  98.           Access to system interrupts:  QB.QLB/QB.LIB/QB.BI (C)
  99.  
  100.           Incorporated  within  this  library  are QuickBASIC's QB.QLB
  101.           (C), QB.LIB (C) and QB.BI (C).  These files  were  necessary
  102.           for  writing the mouse routines.  Because of their presence,
  103.           you also have access  to  DOS  service  calls.   This  is  a
  104.           powerful feature for any programmer.
  105.  
  106.  
  107.  
  108.                **   What the Q4Tool Library does not provide   **
  109.               ====================================================
  110.  
  111.  
  112.           Q4Tool  does  not  contain routines for data input or manip-
  113.           ulation.  It is felt these  type  of  procedures  should  be
  114.           handled  by  the programmer for their particular application
  115.           needs.  Absent also from this library is  the  abundance  of
  116.           routines  that  can't  possibly  be  incorporated into every
  117.           program.  Q4T is intended to be a small library  from  which
  118.           to build from.
  119.  
  120.  
  121.                **   The nuts and bolts of the Q4Tool Library   **
  122.               ====================================================
  123.  
  124.  
  125.           The following is a clarified description of  the  prototypes
  126.           used in the CALL's to these Q4Tool library routines.  Please
  127.           note  the  variable  types  used  for the arguments in these
  128.           routines.  The mouse service calls are designed to work with
  129.           a Microsoft (R) mouse driver or close compatible.
  130.  
  131.  
  132.           -------------------
  133.           MouseStatus(Ready%)
  134.           -------------------
  135.           This routine does a nondestructive interrupt vector check to
  136.           determine  the  existence  of  a mouse driver.  This routine
  137.           should be called prior to using any of the other  Q4T  mouse
  138.           routines  to  insure  the  presence  of  the mouse interrupt
  139.           (33H).
  140.  
  141.           Passed:  An integer variable
  142.  
  143.           Returns: 0 if a mouse driver is not detected
  144.                    1 if a mouse driver has been installed
  145.  
  146.           Example:  CALL MouseStatus(have%)
  147.  
  148.  
  149.           ----------------
  150.           MouseReset(Set%)
  151.           ----------------
  152.           This routine will initialize the mouse driver and will allow
  153.           the saving and restoring of two separate mouse states.
  154.  
  155.           Passed:  An initialized integer variable or constant
  156.                    0 = hard reset - initializes mouse driver, turns
  157.                        mouse pointer off and disables any prior
  158.                        user installed events (function 00H)
  159.                    1 = soft reset - reset mouse driver and turns
  160.                        pointer off (function 21H)
  161.                    2 = will save the current mouse state to mouse
  162.                        buffer #1
  163.                    3 = will restore the mouse state as saved in mouse
  164.                        buffer #1
  165.                    4 = will save the current mouse state to mouse
  166.                        buffer #2
  167.                    5 = will restore the mouse state as saved in mouse
  168.                        buffer #2
  169.  
  170.           Returns:  If passed a variable initialized to 0, will reset
  171.                     mouse and return number of buttons installed, else
  172.                     returns nothing
  173.  
  174.           Example:  buttons% = 0
  175.                     CALL MouseReset(buttons%)
  176.  
  177.  
  178.           ----------------------
  179.           MouseVersion(Version$)
  180.           ----------------------
  181.           This routine will return both the major and minor version of
  182.           the mouse driver installed.
  183.  
  184.           Passed:  A string variable at lease 5 characters in length
  185.  
  186.           Returns:  A string containing the version of the mouse
  187.                     driver installed.  (i.e., 6.123)
  188.  
  189.           Example:  CALL MouseVersion(ver$)
  190.  
  191.  
  192.           ---------------------
  193.           MouseVisible(Status%)
  194.           ---------------------
  195.           This routine will allow  the  mouse  pointer  to  be  either
  196.           turned  on  or  off.  This routine has been stabilized by an
  197.           internal variable to  compensate  for  the  mouse  interrupt
  198.           counter.   Recursive  calls  to  the  same  Status% will not
  199.           increase or decrease the mouse interrupt counter.  This will
  200.           only be done by opposing Status% calls.
  201.  
  202.           Passed:  An initialized integer variable or constant
  203.                    0 = mouse pointer off
  204.                    1 = mouse pointer on
  205.  
  206.           Returns:  Nothing
  207.  
  208.           Example:  CALL MouseVisible(1)
  209.                     CALL MouseVisible(off%)
  210.  
  211.  
  212.           ----------------------------------------
  213.           MouseLocate(ScrnRowY%, ScrnColX%, Mode%)
  214.           ----------------------------------------
  215.           This routine will place the  mouse  pointer  at  the  screen
  216.           location  indicated  by its arguments.  The Mode switch will
  217.           allow the location to be given  in  either  row/column  text
  218.           positions or X/Y pixel positions.
  219.  
  220.           Passed:  An initialized integer variable or constant
  221.                    Mode 0 = pixel positions
  222.                       ScrnColX% = horizontal (X) position with a value
  223.                                   from 0 to 632
  224.                       ScrnRowY% = vertical (Y) position with a value
  225.                                   from 0 to 192
  226.                    note:  The pixel given is the upper left dot of
  227.                           the standard 8x8 mouse pointer.  Pixel
  228.                           positions start from 0,0.
  229.  
  230.                    Mode 1 = text positions
  231.                       ScrnColX% = text column position with a value
  232.                                   from 1 to 80
  233.                       ScrnRowY% = text row position with a value from
  234.                                   1 to 25
  235.  
  236.  
  237.           Returns:  Nothing
  238.  
  239.           Example:  CALL MouseLocate(12, 30, 1)
  240.                     CALL MouseLocate(y%, x%, 0)
  241.  
  242.  
  243.           ------------------------------------------
  244.           MousePosition(ScrnRowY%, ScrnColX%, Mode%)
  245.           ------------------------------------------
  246.           This  routine  will return the current position of the mouse
  247.           pointer.  The Mode switch will allow the  location  returned
  248.           to be either given in row/column text positions or X/Y pixel
  249.           positions.
  250.  
  251.           Passed:  An initialized integer variable or Mode% constant
  252.                    Mode 0 = returned values represent X/Y pixel
  253.                             positions
  254.                    Mode 1 = returned values represent row/column
  255.                             positions
  256.  
  257.           Returns:  An integer value
  258.                     Mode 0
  259.                        ScrnColX% = current horizontal (X) position of
  260.                                    mouse pointer as represented by
  261.                                    pixels (0 to 632)
  262.                        ScrnRowY% = current vertical (Y) position of
  263.                                    mouse pointer as represented by
  264.                                    pixels (0 to 192)
  265.                     note:  The pixel given is the upper left dot of
  266.                            the standard 8x8 mouse pointer.  Pixel
  267.                            positions start from 0,0.
  268.  
  269.                     Mode 1
  270.                        ScrnColX% = current column position of mouse
  271.                                    pointer (1 to 80)
  272.                        ScrnRowY% = current row position of mouse
  273.                                    pointer (1 to 25)
  274.  
  275.           Example:  CALL MousePosition(TextRow%, TextCol%, 1)
  276.  
  277.  
  278.           ------------------------------------------------------------
  279.           MouseLimits(UpRowY%, LeftColX%, LowRowY%, RightColX%, Mode%)
  280.           ------------------------------------------------------------
  281.           This routine will let you limit  the  motion  of  the  mouse
  282.           pointer.    The   mouse   pointer  will  reside  within  the
  283.           boundaries  specified  by  the  arguments  passed  to   this
  284.           routine.  The  Mode switch will allow the limited area to be
  285.           either given in  row/column  text  positions  or  X/Y  pixel
  286.           positions.
  287.  
  288.           Passed:  An initialized integer variable or constant
  289.                    Mode 0 = pixel positions
  290.                       LeftColX% = left horizontal (X) position with a
  291.                                   value from 0 to 632
  292.                       UpRowY% = upper vertical (Y) position with a
  293.                                 value from 0 to 192
  294.                       RightColX% = right horizontal (X) position with
  295.                                   a value from LeftColX% to 632
  296.                       LowRowX% = lower vertical (Y) position with a
  297.                                   value from UpRowY% to 192
  298.                    note:  The pixel given is the upper left dot of
  299.                           the standard 8x8 mouse pointer.  Pixel
  300.                           positions start from 0,0.
  301.  
  302.                    Mode 1 = text positions
  303.                       LeftColX% = left column position with a value
  304.                                   from 1 to 80
  305.                       UpRowY% = upper row position with a value from
  306.                                 1 to 25
  307.                       RightColX% = right column position with a value
  308.                                    from LeftColX% to 80
  309.                       LowRowY% = lower row position with a value from
  310.                                  UpRowY% to 25
  311.  
  312.           Returns:  Nothing
  313.  
  314.           Example:  CALL MouseLimits(10, 25, 15, 55, 1)
  315.  
  316.  
  317.           -------------------------------------------------------------
  318.           MouseExclude(UpRowY%, LeftColX%, LowRowY%, RightColX%, Mode%)
  319.           -------------------------------------------------------------
  320.           This  routine  will  allow  the mouse pointer to be excluded
  321.           from any portion of the screen as specified by the arguments
  322.           passed to this routine.  When the mouse pointer  enters  the
  323.           excluded  boundaries,  the pointer is turned off.  The mouse
  324.           interrupt (33H)  does  not,  however,  reinstate  the  mouse
  325.           pointer  to the on condition upon exiting the excluded area.
  326.           This process must be performed within the  programming  code
  327.           itself.    The   excluded   area  cannot  be  saved  by  the
  328.           MouseReset() routines.  The mode switch will allow  the  ex-
  329.           cluded  area to be either given in row/column text positions
  330.           or X/Y pixel positions.
  331.  
  332.           Passed:  An initialized integer variable or constant
  333.                    Mode 0 = pixel positions
  334.                       LeftColX% = left horizontal (X) position with a
  335.                                   value from 0 to 632
  336.                       UpRowY% = upper vertical (Y) position with a
  337.                                 value from 0 to 192
  338.                       RightColX% = right horizontal (X) position with a
  339.                                    value from LeftColX% to 632
  340.                       LowRowX% = lower vertical (Y) position with a
  341.                                  value from UpRowY% to 192
  342.                    note:  The pixel given is the upper left dot of
  343.                           the standard 8x8 mouse pointer.  Pixel
  344.                           positions start from 0,0.
  345.  
  346.                    Mode 1 = text positions
  347.                       LeftColX% = left column position with a value
  348.                                   from 1 to 80
  349.                       UpRowY% = upper row position with a value from
  350.                                 1 to 25
  351.                       RightColX% = right column position with a value
  352.                                    from LeftColX% to 80
  353.                       LowRowY% = lower row position with a value from
  354.                                  UpRowY% to 25
  355.  
  356.           Returns:  Nothing
  357.  
  358.           Example:  CALL MouseExclude(15, 20, 21, 35, 1)
  359.  
  360.  
  361.           -------------------------------------------------
  362.           MouseClick(LeftClick%, MiddleClick%, RightClick%)
  363.           -------------------------------------------------
  364.           This  routine  will  return  a  value indicating the current
  365.           mouse button in use.  The value is only  returned  upon  the
  366.           release  of  the button, thus returning the value only once.
  367.           This allows the mouse button status to be  effectively  used
  368.           within a loop.
  369.  
  370.           Passed:  An integer variable
  371.  
  372.           Returns:  0 = button not in use
  373.                     1 = button has been clicked
  374.  
  375.           Example:  CALL MouseClick(lft%, mid%, rgt%)
  376.  
  377.  
  378.           -----------------------------------------------------
  379.           MouseScroll(LeftButton%, MiddleButton%, RightButton%)
  380.           -----------------------------------------------------
  381.           This routine will return  a  value  indicating  the  current
  382.           mouse   button   being  pressed.   This  value  will  remain
  383.           constant until the button is released.
  384.  
  385.           Passed:  An integer variable
  386.  
  387.           Returns:  0 = button not in use
  388.                     1 = button is being pressed
  389.  
  390.           Example:  CALL MouseScroll(lft%, mid%, rgt%)
  391.  
  392.  
  393.           --------------------------------
  394.           MouseCursor(Fore%, Back%, Char%)
  395.           --------------------------------
  396.           This routine allows you to change the character and color of
  397.           the mouse pointer.
  398.  
  399.           Passed:  An initialized integer variable or constant
  400.                    Fore = foreground color for the new pointer
  401.                           (within a range of 0 to 15)
  402.                    Back = background color for the new pointer
  403.                           (within a range of 0 to 7)
  404.                    Char = ASCII decimal value for the character of the
  405.                           new pointer (within a range of 0 to 255)
  406.  
  407.           Returns:  Nothing
  408.  
  409.           Example:  CALL MouseCursor(12, 7, 30)
  410.  
  411.  
  412.           --------------------------------------------------------
  413.           DoWindow(UpR%, LfC%, VSz%, HSz%, Fgd%, Bgd%, Frm%, Shw%,
  414.                    Txt$, Lct%)
  415.           --------------------------------------------------------
  416.           This routine will create attractive application  windows  at
  417.           any  screen  position.  You have control over color, type of
  418.           frame and color, type and location of shadow,  and  location
  419.           of  window title and style.  This windowing routine offers a
  420.           wide variety of possibilities.
  421.  
  422.           Passed:  An initialized integer variable or constant,
  423.                    and string variable or constant for title
  424.                    UpR = upper row position for start of window
  425.                          (within a range of 1 to 24)
  426.                    LfC = left column position for start of window
  427.                          (within a range of 1 to 79)
  428.                    VSz = vertical size of window (# of rows)
  429.                          (within a range of 26 minus UpR)
  430.                    HSz = horizontal size of window (# of columns)
  431.                          (within a range of 81 minus LfC)
  432.                    Fgd = foreground window color (frame/text)
  433.                          (within a range of 0 to 15)
  434.                    Bgd = background window color (window structure)
  435.                          (within a range of 0 to 7)
  436.                    Frm = frame type, if any
  437.                          0 = no frame
  438.                          1 = single line
  439.                          2 = double line
  440.                          3 = single vertical and double horizontal
  441.                          4 = single horizontal and double vertical
  442.                          5 = solid frame enclosing the window
  443.                    Shw = shadow location and type, if any
  444.                          0 = no shadow
  445.                          1 = shadow left side and bottom of window
  446.                              (black in color)
  447.                          2 = shadow right side and bottom of window
  448.                              (black in color)
  449.                          3 = shadow left side and bottom of window
  450.                              (tinted black)
  451.                          4 = shadow right side and bottom of window
  452.                              (tinted black)
  453.                          note:  Tinted black is a combination, with
  454.                                 ASCII character #177, of the color
  455.                                 attribute outside the window and black.
  456.                    Txt = string variable or constant used for the
  457.                          title of the window
  458.                          note: Empty double quotes ("") or a string
  459.                                initialized to null will not produce
  460.                                a title.
  461.                    Lct = determines the location of the title, if any
  462.                          0 = title at top without brackets
  463.                          1 = title at bottom without brackets
  464.                          2 = title at top with brackets
  465.                          3 = title at bottom with brackets
  466.                          note:  If a title is not present, the
  467.                                 location value has no effect.
  468.  
  469.  
  470.                    note:  The horizontal and vertical size cannot be
  471.                           less then 2.
  472.  
  473.           Returns:  Nothing
  474.  
  475.           Example:  CALL DoWindow(5, 10, 15, 60, 14, 6, 5, 3, "", 0)
  476.  
  477.  
  478.           -----------------
  479.           PutScrn(ScrnBuf$)
  480.           -----------------
  481.           This routine will allow you to save the entire  contents  of
  482.           the  screen currently being displayed.  The screen saved can
  483.           later be retrieved and displayed with the companion  routine
  484.           GetScrn().   The screens contents is saved to a string vari-
  485.           able or array initialized  to  4000  characters  in  length.
  486.           (i.e., DIM ScrnBuf(3) AS STRING * 4000)
  487.  
  488.           Passed:  An initialized string variable or array at least
  489.                    4000 characters in length
  490.  
  491.           Returns:  current screens contents
  492.  
  493.           Example:  DIM ScrnBuf AS STRING * 4000
  494.                     CALL PutScrn(ScrnBuf)
  495.  
  496.                     DIM SHARED ScrnBufArr(2) AS STRING * 4000
  497.                     CALL PutScrn(ScrnBufArr(0))  [default option base]
  498.  
  499.  
  500.           -----------------
  501.           GetScrn(ScrnBuf$)
  502.           -----------------
  503.           This routine will allow you  to  retrieve  and  display  the
  504.           contents  of  the  screen  saved  by  its  companion routine
  505.           PutScrn().
  506.  
  507.           Passed:  The string variable or array that contains the
  508.                    screen to be displayed.
  509.  
  510.           Returns:  Nothing
  511.  
  512.           Example:  CALL GetScrn(ScrnBuf)
  513.                     CALL GetScrn(ScrnBufArr(1))
  514.  
  515.  
  516.           ---------------------------------
  517.           PrtScrn(Strg$, Row%, Col%, Attr%)
  518.           ---------------------------------
  519.           This is a machine language routine that will print a  string
  520.           variable or constant to the screen at the location and color
  521.           indicated  by its arguments.  The attribute is a combination
  522.           of  the  foreground  and  background  colors  and   can   be
  523.           determined  by  the  following  formula: (background * 16) +
  524.           foreground.
  525.  
  526.           Passed:  Initialized variables or constants
  527.                    Strg = string variable or constant to be displayed
  528.                    Row  = screen row for display
  529.                           (within a range of 1 to 25)
  530.                    Col  = screen column for display
  531.                           (within a range of 1 to 80)
  532.                    Attr = attribute of color to be displayed
  533.                           (within a range of 0 to 127)
  534.  
  535.           Returns:  Nothing
  536.  
  537.           Example:  CALL PrtScrn("Hello Universe", 12, 33, 110)
  538.                     CALL PrtScrn(hello$, rw%, cl%, att%)
  539.  
  540.  
  541.           ------------
  542.           Ctr(String$)
  543.           ------------
  544.           This is a handy little  function  that  returns  the  column
  545.           position  need  to  screen center a string variable.  It can
  546.           easily be incorporated into BASIC's LOCATE statement.
  547.  
  548.           Passed:  An initialized string variable
  549.  
  550.           Returns:  Column position needed to screen center a
  551.                     string variable.
  552.  
  553.           Example:  LOCATE 12, Ctr(Strg$)
  554.                     or
  555.                     cntr = Ctr(Strg$)
  556.                     LOCATE 12, cntr
  557.  
  558.  
  559.           -----------------------
  560.           Delay(Length!, Forced%)
  561.           -----------------------
  562.           This routine is  a  smart  alternative  to  QB's  new  SLEEP
  563.           statement  or the numerous appearances of LOOPs.  This delay
  564.           can either be forced or user bypass  with  the  keyboard  or
  565.           mouse  buttons  (if installed).  The delay makes use of real
  566.           time so CPU speed has little effect.
  567.  
  568.           Passed:  Initialized integer variables or constants
  569.                    Length = single precision integer indicating the
  570.                             length of the delay in seconds
  571.                    Forced = integer indicating the type of delay
  572.                             0 = not forced (can be bypassed with
  573.                                 any key or mouse button)
  574.                             1 = delay is forced (remains in effect
  575.                                 until specified time has elapsed)
  576.                    note:  If both Length and Forced are 0, then
  577.                           Delay() will wait indefinitely until any
  578.                           key or mouse button is pressed.
  579.  
  580.           Returns:  Nothing
  581.  
  582.           Example:  CALL Delay(.25, 0)
  583.                     CALL Delay(lgth1!, 1)
  584.  
  585.  
  586.           -----------------------------------
  587.           QB.QLB (C) - QB.LIB (C) - QB.BI (C)
  588.           -----------------------------------
  589.           These three QuickBASIC files  are  incorporated  into  Q4T's
  590.           libraries.   They  are necessary for the DOS interrupts used
  591.           by the mouse routines.  The  following  is  a  list  of  the
  592.           services   provided   by  these  files.   Because  of  their
  593.           presence, you also have access to these important  services.
  594.           Please  consult  your  QuickBASIC  4.x reference manuals for
  595.           information on the use of these  QB CALL's.  The  demonstra-
  596.           tion  source code (Q4T-DEMO.BAS) illustrates an example of a
  597.           CALL to the Interrupt() routine.
  598.  
  599.                CALL Absolute()
  600.                CALL Int86Old()
  601.                CALL Int86XOld()
  602.                CALL Interrupt()
  603.                CALL InterruptX()
  604.  
  605.  
  606.                        **   The $INCLUDE file Q4T.BI   **
  607.                       ====================================
  608.  
  609.  
  610.           The file Q4T.BI contains the declarations for the Ctr()  and
  611.           Delay()   routines.    This   file  must  be  used  in  QB's
  612.           metacommand  instructions  and  should  be  placed  at   the
  613.           beginning  of  your  code.  Generally, the TYPE declarations
  614.           for QB's Interrupt() and InperruptX() calls are also  placed
  615.           in  this  file.   Please  see  the demonstration source code
  616.           (Q4T-DEMO.BAS) for an example of a  metacommand  instruction
  617.           or  consult  your  QB  reference  manuals for information on
  618.           $INCLUDE: files.
  619.  
  620.  
  621.  
  622.                 **   A demonstration of the Q4Tool Library   **
  623.                =================================================
  624.  
  625.  
  626.           There's  an  old  cliche  that states, "A picture is worth a
  627.           thousand words".  So, provided with  Q4Tool  is  the  source
  628.           code   [Q4T-DEMO.BAS]  for  a  short  demonstration  of  its
  629.           routines.   This  source  code  will  give  you   a   better
  630.           understanding  as  to  the actual usage of the Q4T routines.
  631.           The code is presented in an ASCII format and can  be  viewed
  632.           with  any  common  text editor or sent to your printer using
  633.           the syntax;  COPY Q4T-DEMO.BAS PRN.  This  demonstration  is
  634.           quite   simple   and   by  no  means  illustrates  the  only
  635.           application for the Q4Tool Library.  If you wish to  compile
  636.           this demo, the following command line syntax should be used.
  637.  
  638.           From the DOS command line for a stand-alone EXE:
  639.  
  640.                BC Q4T-DEMO,/O;
  641.                LINK Q4T-DEMO+SHOWMENU,,,Q4T/E;
  642.  
  643.           Note:   Q4T-DEMO.BAS  code  can  be  viewed  but  not ran or
  644.                   compiled  from  within  the  QB  environment.    The
  645.                   environment   does  not  support  the  CALL  to  the
  646.                   external demo module ShowMenu().
  647.  
  648.  
  649.            **   Compiling within the QuickBASIC 4.5 Environment   **
  650.           ===========================================================
  651.  
  652.  
  653.           Q4Tool  was  developed  and  compiled with QuickBASIC 4.00b.
  654.           QuickBASIC,  when  compiling,  includes  the  name  of   the
  655.           standard  library  in  the object module.  In this case, the
  656.           library BCOM41.LIB is used.   Due  to  the  syntax  used  by
  657.           QuickBASIC  4.5  within  its environment, a LINK warning may
  658.           result and is easily circumvented.
  659.  
  660.              LINK : warning L4051: BCOM41.LIB : cannot find library
  661.              Enter new file spec:
  662.  
  663.           On  the  line  "Enter new file spec:"  you need to supply QB
  664.           with the path and library for the version you are using.
  665.  
  666.           Examples for QB 4.5:
  667.  
  668.              For stand-alone EXE  -  C:\LIB\BCOM45.LIB
  669.  
  670.              For run-time EXE  -  C:\LIB\BRUN45.LIB
  671.  
  672.              Note:   If the location of your libraries is  within  the
  673.                      current  directory  or  is  set  within  the  DOS
  674.                      environment, then the path to your  libraries  is
  675.                      not necessary.
  676.  
  677.           Q4Tool  can  also be linked to your object modules using the
  678.           standard DOS command  line.   This  process  avoids  the  QB
  679.           environment  entirely.   Your  source code (BAS) needs to be
  680.           saved in text (ASCII) format in  order  for  BC  to  operate
  681.           properly.   The  following  syntax has been tested and works
  682.           quite well.
  683.  
  684.              For stand-alone EXE  -  BC YOURFILE.BAS,,/O;
  685.                                      LINK YOURFILE.OBJ,,,Q4T.LIB/E;
  686.  
  687.              For run-time EXE  -  BC YOURFILE.BAS;
  688.                                   LINK YOURFILE.OBJ,,,Q4T.LIB;
  689.  
  690.              Note:   Be  sure  you  supply  all necessary command line
  691.                      switches  needed  for  your  source   code   when
  692.                      compiling (BC).  [i.e.  /E /X /W]
  693.  
  694.           Please  consult  your  QuickBASIC reference manuals for more
  695.           detailed information on compiling and linking your  programs
  696.           from the DOS command line.
  697.  
  698.  
  699.                    **   A look inside the Q4Tool Library   **
  700.                   ============================================
  701.  
  702.  
  703.           The  Q4Tool Library is comprised of six object code modules.
  704.           With this type of construction,  it  is  possible  to  build
  705.           libraries  containing  only the particular routines desired,
  706.           or incorporate them into existing libraries.  These  modules
  707.           are  provided  to  you  (on  disk) upon your registration of
  708.           Q4Tool.  Below is a list  of  the  object  modules  and  the
  709.           routines contained in each.
  710.  
  711.                 Module Name         Routines          Source Type
  712.                 -----------         --------          -----------
  713.  
  714.                 Q4TOOL.OBJ          Ctr()                 BAS
  715.                                     Delay()               BAS
  716.  
  717.                 Q4WIND.OBJ          DoWindow()            BAS
  718.  
  719.                 Q4MOUSE.OBJ         Mouse*()              BAS
  720.  
  721.                 PRTSCRN.OBJ         PrtScrn()             ASM
  722.  
  723.                 PUTSCRN.OBJ         PutScrn()             ASM
  724.  
  725.                 GETSCRN.OBJ         GetScrn()             ASM
  726.  
  727.           The  routine  Dowindow()  does  make CALL's to PrtScrn() and
  728.           must have access to its services.   When  using  the  Q4WIND
  729.           module,  the PRTSCRN module should always be linked with it.
  730.           If MOUSE.OBJ is used separately,  it  must  have  access  to
  731.           QB.LIB or QB.QLB if used within the QB environment.
  732.  
  733.           The screens handling  modules  (ASM)  employ  direct  memory
  734.           access and assume the segment address of the regen buffer to
  735.           be the following:
  736.  
  737.                       Card Type             Segment Address
  738.                      -----------           -----------------
  739.  
  740.                       Monochrome                B0000H
  741.  
  742.                       Color                     B8000H
  743.  
  744.           The  following  is  a list of internal variables used in the
  745.           mouse routines.  These variable names should not be used  by
  746.           your  program  structure  in  conjunction with the COMMON or
  747.           SHARED Statements.
  748.  
  749.                visible33%       mouse1buf33%()     mouse2buf33%()
  750.  
  751.           The  remaining  variables  within  the  Q4T   routines   are
  752.           initialized upon their CALL and are not defined as SHARED.
  753.  
  754.  
  755.               **   A few final notes about the Q4Tool Library   **
  756.              ======================================================
  757.  
  758.  
  759.           This documentation is not written to be a tutorial and makes
  760.           the  assumption  you  have  some  knowledge  of  the calling
  761.           conventions for QuickBASIC.  The demonstration  source  code
  762.           (Q4T-DEMO.BAS)  was  written  to  provide you with a working
  763.           example of the Q4T routines and  is  a  valuable  source  of
  764.           information.
  765.  
  766.           Q4Tool  was  developed  and tested on a 16-bit 8088 machine,
  767.           running at 8 mhz, and should perform  as  expected  on  most
  768.           computers within the "86" family.
  769.  
  770.           The Q4Tool Library is presented as-is and with no warranties
  771.           expressed or implied.  CareWare  assumes  no  responsibility
  772.           for  this products use, misuse, or lose of any kind incurred
  773.           by its use.
  774.  
  775.           The Q4Tool Library  is  copyrighted  to  CareWare  with  all
  776.           rights  reserved, and is distributed as a Shareware product.
  777.           If you find Q4T to be of  value  and  continue  to  use  its
  778.           services,  then  you are required to register your copy with
  779.           CareWare.    A   registration  form  is  provided  for  your
  780.           convenience.
  781.  
  782.           Q4Tool  may  be  shared  with  others  as long as it remains
  783.           unaltered and distributed in its entirety.   A  distribution
  784.           fee,  not to exceed $6.00, may be imposed by disk vendors to
  785.           cover shipping and  handling  costs.   The  following  files
  786.           comprise  the  whole of this product, and are distributed as
  787.           the file Q4TOOL.ZIP.
  788.  
  789.                  Q4T.LIB        Q4TOOL.DOC         SHOWMENU.OBJ
  790.                  Q4T.QLB        Q4T-DEMO.BAS
  791.                  Q4T.BI         Q4T-DEMO.EXE
  792.  
  793.           Upon  your completed registration you are granted full usage
  794.           and support for this product.  Any comments  or  suggestions
  795.           are gratefully accepted and an honest attend will be made to
  796.           answer them.  Good Luck and Enjoy!
  797.  
  798.           Microsoft is a registered trademark of the Microsoft Corp.
  799.  
  800.  
  801.                 **   The Shareware principle works for you   **
  802.                =================================================
  803.  
  804.  
  805.           R. J. Crouch
  806.           CareWare
  807.           10217 Ridge View Dr.
  808.           Grass Valley, CA  95945
  809.  
  810.  
  811.           This program is produced by a member of the  Association  of
  812.           Shareware  Professionals (ASP).  ASP wants to make sure that
  813.           the shareware principle works for you.  If you are unable to
  814.           resolve a shareware-related problem with an  ASP  member  by
  815.           contacting the member directly, ASP may be able to help. The
  816.           ASP Ombudsman can help you resolve a dispute or problem with
  817.           an  ASP  member,  but does not provide technical support for
  818.           members' products.  Please write to  the  ASP  Ombudsman  at
  819.           P.O.   Box  5786,  Bellevue,  WA  98006 or send a CompuServe
  820.           message via easyplex to ASP Ombudsman 70007,3536.
  821.  
  822.  
  823.                   _______
  824.              ____|__     |                (R)
  825.           --|       |    |-------------------
  826.             |   ____|__  |  Association of
  827.             |  |       |_|  Shareware
  828.             |__|   o   |    Professionals
  829.           -----|   |   |---------------------
  830.                |___|___|    MEMBER
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.                             The Q4Tool Library [Q4T]
  839.                                     Ver. 1.1
  840.                                Registration Form
  841.                 _______________________________________________
  842.  
  843.  
  844.          CareWare
  845.          10217 Ridge View Dr.
  846.          Grass Valley, CA  95945
  847.  
  848.  
  849.          Quantity        Type of registration          Cost      Total
  850.          --------        --------------------          ----      -----
  851.  
  852.           ______    Registration of your current      $25.00    _______
  853.                     copy
  854.  
  855.           ______    Registration, latest ver., OBJ    $30.00    _______
  856.                     modules & SHOWMENU.BAS on disk
  857.  
  858.           ______    All the above plus all module     $55.00    _______
  859.                     source codes on disk
  860.  
  861.                                                     Subtotal    _______
  862.  
  863.  
  864.           Disk size:  [  ] 5.25  -  [  ] 3.5                    _______
  865.                       (please add $1.00 for 3.5)
  866.  
  867.           Please add $3.00 for shipping outside of U.S.         _______
  868.  
  869.  
  870.           (apd)                              Amount Enclosed    _______
  871.  
  872.  
  873.           All  registered  user  will  receive  prompt  and  courteous
  874.           support for this  product.   Notification  of  upgrades  are
  875.           provided when available.  Thank you for your support.
  876.  
  877.  
  878.           Name ___________________________________________
  879.  
  880.           Address ________________________________________
  881.  
  882.           City, State, Zip _______________________________
  883.  
  884.           Phone (optional) _______________________________
  885.  
  886.  
  887.           Please make payable to the author - R. J. Crouch
  888.  
  889.  
  890.  
  891.