home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / basic / mlib30 / mlib.doc < prev    next >
Encoding:
Text File  |  1994-02-21  |  122.0 KB  |  3,023 lines

  1.         
  2.  
  3.  
  4.  
  5.                                       
  6.                                       
  7.                                       
  8.                                       
  9.                                       
  10.                                       
  11.                                       
  12.                                       
  13.                                       
  14.                                       
  15.                                       
  16.                     =======================================                
  17.                     =                                     =
  18.                     =            MLIB(TM) v3.0            =
  19.                     =                                     =
  20.                     =    Mouse library for QuickBASIC     =
  21.                     =                                     =
  22.                     =                 4.x                 =
  23.                     =                                     =
  24.                     =     and Visual Basic for MS-DOS     =
  25.                     =                                     =
  26.                     =                                     =
  27.                     =    Copyright (C) 1994 TERRY VENN    =
  28.                     =                                     =
  29.                     =         All Rights Reserved         =
  30.                     =                                     =
  31.                     =======================================
  32.                     =                                     =
  33.                     =             TERRY VENN              =
  34.                     =                                     =
  35.                     =       BOX 3A-10, D'ARCY, SK.,       =
  36.                     =                                     =
  37.                     =           S0L 0N0, CANADA.          =
  38.                     =                                     =
  39.                     =        PHONE: 1-306-379-4505        =
  40.                     =                                     =
  41.                     =======================================
  42.         
  43.         
  44.                   
  45.                   MLIB(TM) VERSION 3.0 COPYRIGHT (C) 1994 TERRY VENN
  46.  
  47.                                  ALL RIGHTS RESERVED
  48.  
  49.  
  50.                               
  51.         =====================================================================
  52.         =                                                                   =
  53.         = This software is a Shareware release and is provided at no charge =
  54.         = to you for evaluation.                                            =
  55.         =                                                                   =
  56.         = YOU MAY USE THIS SOFTWARE ON A TRIAL BASIS PROVIDING YOU AGREE    =
  57.         = AND ADHERE TO THE FOLLOWING TERMS:                                =
  58.         =                                                                   =
  59.         = 1. MLIB(TM) IS PROVIDED AS IS.                                    =
  60.         =                                                                   =
  61.         = 2. THE AUTHOR OF MLIB(TM) DISCLAIMS ALL WARRANTIES,               =
  62.         =    EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE       =
  63.         =    WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR ANY PURPOSE.  =
  64.         =                                                                   =
  65.         = 3. THE AUTHOR ASSUMES NO LIABILITIES FOR DAMAGES, CAUSED BY THE   =
  66.         =    USE, MISUSE OR INABILITY TO USE MLIB(TM).                      =
  67.         =                                                                   =
  68.         = 4. ANY FILES THAT YOU CREATE WITH THE AID OF THIS SHAREWARE       =
  69.         =    VERSION AND CONTAIN MLIB(TM) LIBRARY ROUTINES MAY NOT BE       =
  70.         =    DISTRUBUTED UNDER ANY CIRCUMSTANCES.                           =
  71.         =                                                                   =
  72.         =====================================================================
  73.         
  74.         
  75.         
  76.         You may use this software on a 'try-before-you-buy' basis. At the end 
  77.         of this evaluation period you find it to be useful and wish to
  78.         continue using the software, you are then expected to pay the
  79.         registration fee.
  80.  
  81.         You may share copies of this software with others, provided that
  82.         all the files pertaining to this software package are included
  83.         with each copy and in their original condition.
  84.         
  85.         Distributors, refer to the VENDOR.DOC file.
  86.         
  87.         
  88.         QuickBASIC and Visual Basic are trademarks of Microsoft Corporation.
  89.         
  90.         Microsoft, MS and MS-DOS are registered trademarks of Microsoft 
  91.         Corporation.
  92.         
  93.         IBM is a registered trademark of International Business Machines
  94.         Corporation.
  95.         
  96.  
  97.         
  98.         MLIB v3.0 now offers more mouse power to MS-BASIC programmers than 
  99.         ever before, with its all new event-driven mouse interface. MLIB is 
  100.         now capable of working in the background (while your code is running)
  101.         capturing all possible mouse events including double-clicks for all 
  102.         three buttons, pointer movement and even Shift, Crtl and Alt key 
  103.         events. These events are stored in a special buffer and can be 
  104.         removed at any time when needed. This means that while your program
  105.         is performing some time-consuming task, mouse events are being 
  106.         captured and your program can respond to them when the task has been
  107.         completed. No more missed clicks or double-clicks etc., frustrating 
  108.         the user. 
  109.  
  110.         Another important feature, MLIB's event handling routines are simple
  111.         to use. There are only two routines you actually need to work with; 
  112.         one installs and controls the internal handler, the other returns 
  113.         events from the mouse event buffer. A mouse toolkit (written in 
  114.         BASIC) is also provided with this library, to enhance mouse event 
  115.         handling even further.
  116.         
  117.         The use of the event-driven routines is optional. MLIB still provides
  118.         a complete set of standard mouse controlling routines, that may be
  119.         used on their own or, combined with the event-driven routines, its
  120.         totally up to you on how they're used.
  121.         
  122.         MLIB is completely written in 8088 assembly, therefore the procedures
  123.         are small and fast.            
  124.                                        -*-
  125.  
  126.         
  127.         Print a Copy of This Manual:
  128.         
  129.                 1. Place the MLIB diskette into drive A.
  130.                 2. Log onto drive A by typing: A: <Press Enter>
  131.                 3. To begin printing type: COPY MLIB.DOC PRN <Press Enter>
  132.  
  133.         System and Software Requirements: 
  134.         
  135.                 An IBM PC/XT/AT/386 or compatible computer, plus a Microsoft
  136.                 compatible mouse and driver software, and Microsoft 
  137.                 QuickBASIC 4.x or Visual Basic for DOS.
  138.         
  139.         Load the Correct Library:
  140.  
  141.                 To run the sample programs or begin accessing the mouse 
  142.                 routines, you must load the appropriate library for your 
  143.                 particular version of BASIC. For example, to start the BASIC 
  144.                 editor and load the right library:
  145.  
  146.                 1. If you are using QuickBASIC 4.0-4.5, type QB/L MLIBN. 
  147.         
  148.                 2. If you are using Visual Basic for DOS, type VBDOS/L MLIBF. 
  149.         
  150.                 The 'N' appended to the library name identifies it as a near 
  151.                 string support library. The 'F' appended to the library name 
  152.                 identifies it as a far string support library.
  153.         
  154.         
  155.       
  156.         CONTENTS
  157.         =====================================================================
  158.         
  159.         Event Handling Methods
  160.                 
  161.                 Initializing the Mouse ........................ 1 
  162.                 Installing the Mouse Event Handler ............ 1 
  163.                 Enabling the Event Handler .................... 2 
  164.                 Disabling the Event Handler ................... 2 
  165.                 Clearing the Event Buffer ..................... 2 
  166.                 Events Captured by Default .................... 3 
  167.                 Specifying Which Events Are Captured .......... 3 
  168.                 Testing For Button Press Events ............... 5 
  169.                 Testing For Button Release Events ............. 5 
  170.                 Testing For Mouse Pointer Movement ............ 6 
  171.                 Testing For Shift-State Key Events ............ 6 
  172.                 Testing For Double-Click Events ............... 7 
  173.                 Polling For Mouse Events ...................... 8 
  174.                 
  175.         Using Constants
  176.  
  177.                 Mouse Event Handler Commands .................. 9 
  178.                 Mouse Events .................................. 9 
  179.                 Shift State Key Events ........................ 9 
  180.                 Internal Data Offsets ......................... 10
  181.                 
  182.         Event Handling Routines
  183.                                                                         
  184.                 InMouseHandler ................................ 11
  185.                 InMouse ....................................... 12
  186.                 InMouseAddress ................................ 13
  187.                 
  188.         Standard Routines
  189.                 
  190.                 InitPointer ................................... 14
  191.                 ChangePointer ................................. 15
  192.                 HidePointer ................................... 16
  193.                 ShowPointer ................................... 16
  194.                 ShowPtrM ...................................... 17
  195.                 GetButtonM .................................... 18
  196.                 GetPressM ..................................... 19
  197.                 GetReleaseM.................................... 20
  198.                 SetBoundM ..................................... 21
  199.                 SetHLimitM .................................... 22
  200.                 SetVLimitM .................................... 23
  201.                 SetPointer .................................... 24
  202.                 GetSpeedM ..................................... 25
  203.                 SetSpeedM ..................................... 26
  204.                 GetMotionM .................................... 27
  205.                 GetSizeM ...................................... 28
  206.                 SaveStateM .................................... 29
  207.                 RestoreStateM ................................. 30
  208.                 Sample Pointer Shapes ......................... 31
  209.         
  210.         ---------------------------------------------------------------------
  211.         
  212.       
  213.  
  214.         CONTENTS continued...
  215.         =====================================================================
  216.         
  217.         Mouse Toolkit Routines
  218.  
  219.                 InMouseState .................................. 32
  220.                 GetEventsPending .............................. 32
  221.                 GetEventMask .................................. 33
  222.                 SetEventMask .................................. 34
  223.                 GetDblClkSettings ............................. 35
  224.                 SetDblClkSettings ............................. 36
  225.                 InMouseSave ................................... 37
  226.                 InMouseRestore ................................ 37
  227.         
  228.         Additional Routines
  229.  
  230.                 CviBin ........................................ 38
  231.                 CvsBin ........................................ 38
  232.                 GetWord ....................................... 39
  233.                 PutWord ....................................... 39
  234.                 InWinM ........................................ 40
  235.  
  236.         Miscellaneous Information
  237.  
  238.                 Discontinued Routines ......................... 41
  239.                 MLIB and Visual Basic Forms ................... 41
  240.                 MLIB Versus the Basic Editor .................. 42
  241.                 How To Contact the Author ..................... 43
  242.                 Registration Fee .............................. 44
  243.                 How To Register ............................... 44
  244.                 Registered Users Will Receive ................. 44
  245.                 
  246.         ---------------------------------------------------------------------
  247.         
  248.       
  249.  
  250.       
  251.       
  252.         
  253.         
  254.         
  255.         
  256.         
  257.         
  258.         
  259.         
  260.         
  261.         
  262.         
  263.         
  264.         
  265.         
  266.         
  267.         
  268.         =====================================================================
  269.  
  270.  
  271.  
  272.  
  273.                                Event Handling Methods
  274.  
  275.  
  276.  
  277.  
  278.         =====================================================================
  279.         
  280.         
  281.       
  282.         Event Handling Methods
  283.         =====================================================================
  284.         This section provides all the necessary information needed to begin
  285.         accessing the mouse and handling all the different mouse events. All
  286.         of the following code examples make use of symbolic constant names 
  287.         (defined in the MLIB.BI include file) for easier reading. See: Using
  288.         Constants.
  289.         
  290.         
  291.         Initializing the Mouse:        
  292.         
  293.                 Before any of the mouse routines, including the standard 
  294.                 mouse routines, can be accessed, the mouse driver and the 
  295.                 library must be initialized. The Buttons% argument returns 
  296.                 the number of buttons on the mouse; if it returns zero, there 
  297.                 is no driver installed. Note, all the mouse routines can be 
  298.                 safely called whether a mouse driver is installed or not.
  299.                 
  300.                 IMPORTANT: For proper operation always include the MLIB.BI
  301.                 file near the beginning of your code prior to making any 
  302.                 mouse calls.
  303.  
  304.                 ' $INCLUDE: 'MLIB.BI'
  305.  
  306.                 ' Initialize the mouse and library.
  307.                 CALL InitPointer(Buttons%)
  308.  
  309.  
  310.         Installing the Mouse Event Handler:
  311.  
  312.                 To begin capturing mouse events the event handler must be
  313.                 installed. Installing the handler does the following:
  314.  
  315.                 - Links up with the mouse driver.
  316.                 - Places the mouse pointer on the screen.
  317.                 - Begins capturing events when they occur.
  318.                 - Stuffs captured events in the event buffer.
  319.                 
  320.                 By default the event handler captures all button events, 
  321.                 including double-click and shift-state key events. Use the
  322.                 mouse toolkit to alter these settings.
  323.  
  324.                 NOTE: You only need to install the handler once in your
  325.                 program. Disabling the handler just forces it to quit 
  326.                 capturing events. The handler automatically removes itself 
  327.                 when your program ends (normal or abnormal termination).
  328.  
  329.                 ' Install the event handler.
  330.                 CALL InMouseHandler(EventInstall)
  331.                 
  332.         ---------------------------------------------------------------------
  333.                                                                  Continued...
  334.  
  335.                                                                       
  336.                                                                        Page 1
  337.         
  338.         
  339.       
  340.         Event Handling Methods
  341.         =====================================================================
  342.         
  343.         Enabling the Event Handler:
  344.  
  345.                 Once the event handler has been installed, it remains enabled
  346.                 (active) until you explicitly call and disable it. 
  347.                 
  348.                 Enabling the handler places the mouse pointer on the screen,
  349.                 begins responding to mouse events and allows events to be 
  350.                 removed from the event buffer 
  351.  
  352.                 ' Enable event handler.
  353.                 CALL InMouseHandler(EventEnable)
  354.                           
  355.         Disabling the Event Handler:
  356.  
  357.                 Disabling the handler removes the mouse pointer from the 
  358.                 screen, prevents mouse events from being removed from the 
  359.                 event buffer and ignores capturing any mouse events.
  360.  
  361.                 ' Disable event handler.
  362.                 CALL InMouseHandler(EventDisable)
  363.  
  364.         Clearing the Event Buffer:
  365.  
  366.                 Clearing the event buffer removes all mouse events currently
  367.                 pending in the buffer. 
  368.                 
  369.                 NOTE: The handler must be enabled before it will allow the 
  370.                 buffer to be cleared.
  371.                 
  372.                 IMPORTANT: Make sure that you are not inside a loop that 
  373.                 relies on a button release event to exit. For example:
  374.  
  375.                 Clearing the buffer here would cause a continuous loop if the
  376.                 left mouse button has already been released and the event is 
  377.                 waiting in the buffer. For the loop to break, the user would 
  378.                 have to press and release the left button again.
  379.  
  380.                 ' Clear the event buffer.
  381.                 CALL InMouseHandler(ClearBuffer)
  382.  
  383.                 DO
  384.                    ' Poll for mouse events.
  385.                    MouseEvent% = InMouse(MouseX%, MouseY%)
  386.                 
  387.                 LOOP UNTIL MouseEvent% AND LButtonUp
  388.                                            
  389.         ---------------------------------------------------------------------
  390.                                                                  Continued...
  391.  
  392.                                                                       
  393.                                                                       
  394.                                                                        Page 2
  395.         
  396.         
  397.       
  398.         Event Handling Methods
  399.         =====================================================================
  400.  
  401.         Events Captured by Default:
  402.  
  403.                 The event handler captures the following events by default:
  404.  
  405.                 - Left button presses and releases.
  406.                 - Right button presses and releases.
  407.                 - Center button presses and releases.
  408.                 - Left button double-clicks.
  409.                 - Right button double-clicks.
  410.                 - Center button double-clicks.
  411.                 - Shift key pressed during mouse event.
  412.                 - Ctrl key pressed during mouse event.
  413.                 - Alt key pressed during mouse event.
  414.  
  415.                 
  416.         Specifying Which Events Are Captured:
  417.  
  418.                 Capturing events in this section refers to mouse events the
  419.                 event handler traps and stores in the event buffer.
  420.  
  421.                 Event mask refers to a two byte bit-field the event handler 
  422.                 uses to determine which events are captured. 
  423.                 
  424.                 The following table shows which mouse events the user can
  425.                 specifically command the event handler to capture.
  426.  
  427.                 Event mask bit-field: Captures (when set):         Value:
  428.                 ===================== ============================ ==========
  429.                 00000000 00000000---- Mouse pointer movement       1
  430.                 -------- -|||||`----- Left button presses          2
  431.                     |     ||||`------ Left button releases         4
  432.                     |     |||`------- Right button presses         8
  433.                     |     ||`-------- Right button releases        16
  434.                     |     |`--------- Center button presses        32
  435.                     |     `---------- Center button releases       64
  436.                     `---------------- Unused                       ....
  437.                 -------------------------------------------------------------
  438.                 
  439.                 NOTE: To prevent double-click events from being returned, set
  440.                 the double-click speed setting to zero. See the mouse toolkit
  441.                 routine: SetDblClkSettings in this manual. It is impossible to
  442.                 stop shift-state key events from being returned. Just ignore
  443.                 these events if they are not needed.
  444.                                                                    
  445.         ---------------------------------------------------------------------
  446.                                                                  Continued...
  447.  
  448.                                                                       
  449.                                                                       
  450.                                                                       
  451.                                                                       
  452.                                                                        Page 3
  453.         
  454.         
  455.       
  456.         Event Handling Methods
  457.         =====================================================================
  458.  
  459.         Specifying Which Events Are Captured: (continued...)
  460.  
  461.                 The handler uses this mask by default: 00000000 01111110. If
  462.                 your program does not require that any mouse movement events 
  463.                 be trapped, then it would not be necessary to change the 
  464.                 default settings. To build your own mask is simple, for
  465.                 example we will start with a blank mask:
  466.  
  467.                 00000000 00000000
  468.  
  469.                 add pointer movement by OR-ing with the value 1, the mask 
  470.                 would now look like this: 
  471.                 
  472.                 00000000 00000001
  473.  
  474.                 now add left button presses to the mask by OR-ing with the 
  475.                 value 2:
  476.                 
  477.                 00000000 00000011
  478.  
  479.                 finally add left button releases by OR-ing with the value 4,
  480.                 
  481.                 NewMask% = 00000000 00000111
  482.  
  483.                 the finished mask would now total (4+2+1) 7. Now we could 
  484.                 call the SetEventMask() routine and pass it our new mask and 
  485.                 the event handler would start trapping these events and 
  486.                 stuff them in the buffer (if the handler is enabled). 
  487.                 
  488.                 Now if we wanted to stop trapping mouse movement, all we need 
  489.                 to do is use the NOT operator like this:
  490.  
  491.                 NewMask%  = NewMask% AND NOT 1
  492.  
  493.                 then call SetEventMask(NewMask%), the handler will now quit
  494.                 trapping mouse movement.
  495.                 
  496.                 The following code fragment requires that left button plus 
  497.                 pointer movement events be trapped and placed in the event 
  498.                 buffer. The use of the mouse toolkit routines are required 
  499.                 to do this task.
  500.  
  501.                 ' Save current mask.
  502.                 CALL GetEventMask(OldMask%)
  503.  
  504.         ---------------------------------------------------------------------
  505.                                                                  Continued...
  506.  
  507.                                                                       
  508.                                                                       
  509.                                                                       
  510.                                                                        Page 4
  511.         
  512.         
  513.       
  514.         Event Handling Methods
  515.         =====================================================================
  516.  
  517.         Specifying Which Events Are Captured: (continued...)
  518.  
  519.                 ' Create a new event mask to trap left button and mouse 
  520.                 ' movement events.
  521.                 NewMask% = NewMask% OR LButtonDown OR LButtonUp OR MouseMoved
  522.  
  523.                 ' Tell the event handler to start trapping these events.
  524.                 CALL SetEventMask(NewMask%)
  525.                 .
  526.                 . Make use of the captured events here, and when task is
  527.                 . completed, restore mask back to the way it was before
  528.                 . we altered it.
  529.  
  530.                 ' Restore original event mask.
  531.                 CALL SetEventMask(OldMask%)
  532.  
  533.  
  534.         Testing For Button Press Events:
  535.  
  536.                 The following code fragment shows how to test for button 
  537.                 press events:
  538.  
  539.                 ' Pull an event from the event buffer.
  540.                 MouseEvent% = InMouse(MouseX%, MouseY%)
  541.  
  542.                 IF MouseEvent% AND LButtonDown THEN
  543.                    
  544.                    ' Left button was pressed.
  545.  
  546.                 ELSEIF MouseEvent% AND RButtonDown THEN
  547.                    
  548.                    ' Right button was pressed.
  549.  
  550.                 ELSEIF MouseEvent% AND CButtonDown THEN
  551.                    
  552.                    ' Center button was pressed.
  553.  
  554.                 END IF
  555.  
  556.  
  557.         Testing For Button Release Events:
  558.  
  559.                 The following code fragment shows how to test for button 
  560.                 release events:
  561.  
  562.         ---------------------------------------------------------------------
  563.                                                                  Continued...
  564.  
  565.                                                                       
  566.                                                                       
  567.                                                                       
  568.                                                                        Page 5
  569.         
  570.       
  571.         
  572.         Event Handling Methods
  573.         =====================================================================
  574.  
  575.         Testing For Button Release Events: (continued...)
  576.  
  577.                 ' Pull an event from the event buffer.
  578.                 MouseEvent% = InMouse(MouseX%, MouseY%)
  579.  
  580.                 IF MouseEvent% AND LButtonUp THEN
  581.  
  582.                    ' Left button was released.
  583.  
  584.                 ELSEIF MouseEvent% AND RButtonUp THEN
  585.  
  586.                    ' Right button was released.
  587.  
  588.                 ELSEIF MouseEvent% AND CButtonUp THEN
  589.  
  590.                    ' Center button was released.
  591.  
  592.                 END IF
  593.  
  594.  
  595.         Testing For Mouse Pointer Movement:
  596.  
  597.                 The following code fragment shows how to test for mouse 
  598.                 movement.
  599.  
  600.                 ' Pull an event from the event buffer.
  601.                 MouseEvent% = InMouse(MouseX%, MouseY%)
  602.  
  603.                 IF MouseEvent% AND MouseMoved THEN
  604.                    
  605.                    ' The pointer moved.
  606.  
  607.                 END IF
  608.  
  609.                 IF MouseEvent% AND LButtonDown OR (continued on next line...)
  610.                    MouseEvent% AND MouseMoved THEN
  611.                    
  612.                    ' Left button was pressed or the pointer moved.
  613.  
  614.                 END IF
  615.  
  616.  
  617.         Testing For Shift-State Key Events:
  618.  
  619.                 The following code fragment shows how to test for shift- 
  620.                 state key events:
  621.         
  622.         ---------------------------------------------------------------------
  623.                                                                  Continued...
  624.  
  625.                                                                       
  626.                                                                        Page 6
  627.         
  628.         
  629.       
  630.         Event Handling Methods
  631.         =====================================================================
  632.  
  633.         Testing For Shift-State Key Events: (continued...)
  634.  
  635.                 ' Pull an event from the event buffer.
  636.                 MouseEvent% = InMouse(MouseX%, MouseY%)
  637.  
  638.                 IF MouseEvent% AND ShiftKey THEN
  639.                    
  640.                    ' Shift key was down when mouse event occurred.
  641.  
  642.                 ELSEIF MouseEvent% AND CtrlKey THEN
  643.                    
  644.                    ' Ctrl key was down when mouse event occurred.
  645.  
  646.                 ELSEIF MouseEvent% AND AltKey THEN
  647.                    
  648.                    ' Alt key was down when mouse event occurred.
  649.  
  650.                 END IF
  651.  
  652.  
  653.         Testing For Double-Click Events:
  654.  
  655.                 A double-click event is always returned in this order; 
  656.                 ButtonDown, ButtonUp, ButtonDown plus ButtonDblClk and a 
  657.                 final ButtonUp when user releases the button.
  658.  
  659.                 The following code fragment shows how to test for double-
  660.                 clicks.
  661.                 
  662.                 ' Pull an event from the event buffer.
  663.                 MouseEvent% = InMouse(MouseX%, MouseY%)
  664.  
  665.                 IF MouseEvent% AND LButtonDblClk THEN
  666.                 
  667.                    ' Left button was double-clicked.
  668.                 
  669.                 ELSEIF MouseEvent% AND RButtonDblClk THEN
  670.                 
  671.                    ' Right button was double-clicked.
  672.                 
  673.                 ELSEIF MouseEvent% AND CButtonDblClk THEN
  674.                    
  675.                    ' Center button was double-clicked.
  676.  
  677.                 END IF
  678.         
  679.         ---------------------------------------------------------------------
  680.                                                                  Continued...
  681.  
  682.                                                                       
  683.                                                                       
  684.                                                                        Page 7
  685.         
  686.         
  687.  
  688.         Event Handling Methods
  689.         =====================================================================
  690.         
  691.         Polling For Mouse Events:
  692.  
  693.                 The following sample is an empty code shell that shows how 
  694.                 you could poll for mouse and keyboard events. It assumes the
  695.                 mouse event handler's default settings are used. 
  696.                 
  697.                 See: InMouseHandler, for the default settings.
  698.  
  699.                 NOTE: The mouse position is always returned (unless of course 
  700.                 there is no mouse installed) in MouseX% and MouseY%. If the 
  701.                 event buffer is empty the current pointer position is 
  702.                 returned. If an event is returned (if MouseEvent% returns a 
  703.                 value) from the buffer, then the coordinates reflect the 
  704.                 position of the pointer WHEN the mouse event occurred.
  705.                 
  706.                 DO
  707.                    DO ' Poll for a mouse event.
  708.                       MouseEvent% = InMouse(MouseX%, MouseY%)
  709.                    
  710.                       KeyPress$ = INKEY$: KeyEvent% = LEN(KeyPress$)
  711.  
  712.                    LOOP UNTIL MouseEvent% OR KeyEvent%
  713.  
  714.                    IF KeyEvent% THEN ' Branch here for key presses.
  715.  
  716.                    ' Respond to left button events only. You could add code
  717.                    ' to test for the right and center button plus shift-state 
  718.                    ' events here also if needed.
  719.                    IF MouseEvent% THEN
  720.                       
  721.                       IF MouseEvent% AND LButtonDown THEN
  722.                          ' Branch for a left button press.
  723.                       END IF
  724.  
  725.                       IF MouseEvent% AND LButtonUp THEN
  726.                          ' Branch for a left button release.
  727.                       END IF
  728.  
  729.                       IF MouseEvent% AND LButtonDblClk THEN
  730.                          ' Branch for a left button double-click.
  731.                       END IF
  732.                    
  733.                    END IF
  734.  
  735.                 LOOP UNTIL KeyPress$ = CHR$(27) ' The Esc key exits.
  736.  
  737.         ---------------------------------------------------------------------
  738.  
  739.  
  740.                                                                       
  741.                                                                       
  742.                                                                        Page 8
  743.         
  744.       
  745.  
  746.       
  747.       
  748.         
  749.         
  750.         
  751.         
  752.         
  753.         
  754.         
  755.         
  756.         
  757.         
  758.         
  759.         
  760.         
  761.         
  762.         
  763.         
  764.         =====================================================================
  765.  
  766.  
  767.  
  768.  
  769.                                   Using Constants
  770.  
  771.  
  772.  
  773.  
  774.         =====================================================================
  775.         
  776.         
  777.       
  778.         Using Constants
  779.         =====================================================================
  780.         
  781.         MLIB comes with an include file called MLIB.BI. It contains all the
  782.         constant definitions needed to control the event handling routines
  783.         and masking values needed to test for events. Using these constants
  784.         will make your code much easier to read. If your program is large, 
  785.         you may need to edit the MLIB.BI file and remove unused definitions,
  786.         thus increasing the amount of available memory.
  787.  
  788.         Mouse Event Handler Commands:         
  789.                  
  790.                 Use these constants to control the mouse event handler.
  791.                  
  792.                 Constant Name:       Value: Performs This Task:
  793.                 ==================== ====== =================================
  794.                 EventInstall         1      Installs handler - shows pointer
  795.                 EventEnable          2      Enables handler - shows pointer
  796.                 EventDisable         4      Disables handler - hides pointer
  797.                 ClearBuffer          8      Clears event buffer
  798.                 -------------------------------------------------------------
  799.                 
  800.         Mouse Events:
  801.  
  802.                 Use these constants as a mask when testing for mouse events.
  803.         
  804.                 Constant Name:       Value: Represents:
  805.                 ==================== ====== =================================
  806.                 MouseMoved           1      Mouse pointer moved
  807.                 LButtonDown          2      Left button pressed
  808.                 LButtonUp            4      Left button released
  809.                 RButtonDown          8      Right button pressed
  810.                 RButtonUp            16     Right button released
  811.                 CButtonDown          32     Center button pressed
  812.                 CButtonUp            64     Center button released
  813.                 LButtonDblClk        128    Left button double-click
  814.                 RButtonDblClk        256    Right button double-click
  815.                 CButtonDblClk        512    Center button double-click
  816.                 -------------------------------------------------------------
  817.         
  818.         Shift-State Key Events:
  819.  
  820.                 Use these constants as a mask when testing for shift events.
  821.                 
  822.                 Constant Name:       Value: Represents:
  823.                 ==================== ====== =================================
  824.                 ShiftKey             1024   Shift key down
  825.                 CtrlKey              2048   Ctrl key down
  826.                 AltKey               4096   Alt key down
  827.                 -------------------------------------------------------------
  828.  
  829.         ---------------------------------------------------------------------
  830.                                                                  Continued...
  831.                                                                       
  832.                                                                        Page 9
  833.         
  834.         
  835.       
  836.         Using Constants
  837.         =====================================================================
  838.         Internal Data Offsets:
  839.  
  840.                 The mouse toolkit makes use of these constants as an offset
  841.                 pointer to certain internal data. Each constant value is 
  842.                 relative to the first byte in the mouse event handler's data 
  843.                 storage area.
  844.                 
  845.                 Constant Name:       Value: Points To The:
  846.                 ==================== ====== =================================
  847.                 InMouseStateOff      28     Handler status flag
  848.                 EventMaskOff         30     Mouse event mask word
  849.                 ClickSOff            32     Double-click speed setting
  850.                 ClickWOff            34     Double-click width setting
  851.                 ClickHOff            36     Double-click height setting
  852.                 HeadPtrOff           38     Head pointer position
  853.                 TailPtrOff           40     Tail pointer position
  854.                 BufferOff            42     First byte in the event buffer
  855.                 -------------------------------------------------------------
  856.  
  857.         ---------------------------------------------------------------------
  858.                                                                  
  859.  
  860.                                                                       
  861.                                                                       
  862.                                                                       
  863.                                                                       
  864.                                                                       
  865.                                                                       
  866.                                                                       
  867.                                                                       
  868.                                                                       
  869.                                                                       
  870.                                                                       
  871.                                                                       
  872.                                                                       
  873.                                                                       
  874.                                                                       
  875.                                                                       
  876.                                                                       
  877.                                                                       
  878.                                                                       
  879.                                                                       
  880.                                                                       
  881.                                                                       
  882.                                                                       
  883.                                                                       
  884.                                                                       
  885.                                                                       
  886.                                                                       
  887.                                                                       
  888.                                                                       
  889.                                                                       
  890.                                                                       Page 10
  891.         
  892.       
  893.  
  894.       
  895.       
  896.         
  897.         
  898.         
  899.         
  900.         
  901.         
  902.         
  903.         
  904.         
  905.         
  906.         
  907.         
  908.         
  909.         
  910.         
  911.         
  912.         =====================================================================
  913.  
  914.  
  915.  
  916.  
  917.                               Event Handling Routines
  918.  
  919.  
  920.  
  921.  
  922.         =====================================================================
  923.         
  924.         
  925.  
  926.         InMouseHandler
  927.         =====================================================================
  928.  
  929.         Controls the mouse event handler.
  930.  
  931.         DECLARE SUB InMouseHandler(BYVAL Action%)
  932.  
  933.         Syntax: CALL InMouseHandler(Action%)
  934.  
  935.                 Action%   Commands the mouse event handler to perform a
  936.                           specific task.
  937.  
  938.                           Command values: 1 - install
  939.                                           2 - enable
  940.                                           4 - disable
  941.                                           8 - clear buffer
  942.  
  943.         Example: For a working example see: MLIBSAM6.BAS
  944.  
  945.         Comments:
  946.  
  947.                 The mouse event handler is simular to a TSR program, it must
  948.                 be installed before it can perform any tasks. Upon
  949.                 installation, the mouse pointer is placed on the screen, and
  950.                 the handler immediately becomes active responding to mouse
  951.                 events. By default the handler captures left, right, and
  952.                 center mouse button events, including double-clicks and
  953.                 shift-state key events. The captured events are stored in the
  954.                 event buffer, simular to way keyboard data is stored in the
  955.                 type-ahead buffer. The event buffer can hold a maximum of
  956.                 eight mouse events.
  957.  
  958.                 IMPORTANT: The mouse driver and MLIB MUST be initialized
  959.                            before installing the mouse event handler.
  960.  
  961.                 Disabling the handler removes the pointer from the screen and
  962.                 temporarily suspends events from being captured until it is
  963.                 once again enabled, in which case the pointer is placed back
  964.                 on the screen. Clearing the event buffer removes all events
  965.                 that are currently pending, and also clears internal data.
  966.  
  967.                 NOTE: When the handler is disabled, events cannot be returned
  968.                       from the mouse event buffer. Events will be returned
  969.                       when the handler is re-enabled.
  970.  
  971.         See Also: InitPointer, InMouse, Using Constants
  972.  
  973.         ---------------------------------------------------------------------
  974.                                                           Assembly subroutine
  975.  
  976.  
  977.  
  978.  
  979.  
  980.                                                                       Page 11
  981.         
  982.         
  983.       
  984.         InMouse
  985.         =====================================================================
  986.  
  987.         Returns mouse events from the mouse event buffer.
  988.  
  989.         DECLARE FUNCTION InMouse% (MouseX%, MouseY%)
  990.  
  991.         Syntax: MouseEvent% = InMouse(MouseX%, MouseY%)
  992.  
  993.                 MouseEvent%   An argument that is a bit-field with bits
  994.                               corresponding to captured mouse and shift-state
  995.                               events. See the Event bit-field table below.
  996.  
  997.                 MouseX%       Returns the horizontal position (in pixels) of
  998.                               the mouse pointer.
  999.  
  1000.                 MouseY%       Returns the vertical position (in pixels) of
  1001.                               the mouse pointer.
  1002.  
  1003.         Example: For a working example see: MLIBSAM6.BAS
  1004.  
  1005.         Comments:
  1006.  
  1007.                 IMPORTANT: When a mouse event is returned, MouseX and MouseY
  1008.                 return the position of the pointer WHEN the event occurred,
  1009.                 NOT the current position. The current pointer position is
  1010.                 returned ONLY when the mouse event buffer is empty.
  1011.  
  1012.                 The following table shows all possible mouse events and
  1013.                 corresponding bits in the bit-field.
  1014.  
  1015.                 Event bit-field:     Represents (when set):      Bit:  Value:
  1016.                 ==================== =========================== ===== ======
  1017.                 00000000 00000000--- Mouse pointer moved         0     1
  1018.                 ---||||| ||||||`---- Left button pressed         1     2
  1019.                  | ||||| |||||`----- Left button released        2     4
  1020.                  | ||||| ||||`------ Right button pressed        3     8
  1021.                  | ||||| |||`------- Right button released       4     16
  1022.                  | ||||| ||`-------- Center button pressed       5     32
  1023.                  | ||||| |`--------- Center button released      6     64
  1024.                  | ||||| `---------- Left button double-click    7     128
  1025.                  | ||||`------------ Right button double-click   8     256
  1026.                  | |||`------------- Center button double-click  9     512
  1027.                  | ||`-------------- Shift key down              10    1024
  1028.                  | |`--------------- Ctrl key down               11    2048
  1029.                  | `---------------- Alt key down                12    4096
  1030.                  `------------------ Unused                      13-15 ....
  1031.                 -------------------------------------------------------------
  1032.  
  1033.         See Also: InMouseHandler, Using Constants
  1034.  
  1035.         ---------------------------------------------------------------------
  1036.                                                             Assembly function
  1037.  
  1038.                                                                       Page 12
  1039.         
  1040.         
  1041.       
  1042.         InMouseAddress
  1043.         =====================================================================
  1044.  
  1045.         Returns an address to the mouse event handler's internal data area.
  1046.  
  1047.         Use in conjunction with: GetWord, PutWord
  1048.       
  1049.         DECLARE FUNCTION InMouseAddress% (Offset%)
  1050.  
  1051.         Syntax: Segment% = InMouseAddress(Offset%)
  1052.               
  1053.                 Segment%   Returns the segment part of address.
  1054.  
  1055.                 Offset%    Returns the offset part of address.
  1056.  
  1057.         Example:
  1058.                 
  1059.                 Segment% = InMouseAddress(Offset%) ' Get address.
  1060.  
  1061.                 DEF SEG = Segment%                 ' Change to the segment.
  1062.  
  1063.                 Byte% = PEEK(Offset%)              ' Byte now holds the value
  1064.                                                    ' of the first byte in the
  1065.                 DEF SEG                            ' handler's data block.
  1066.  
  1067.         Comments:
  1068.  
  1069.                 The purpose of this function is to keep the library as small 
  1070.                 as possible by eliminating code needed to alter the internal 
  1071.                 default settings of the event handler; and still offer the 
  1072.                 BASIC programmer a way to change these settings if needed.
  1073.  
  1074.                 To change the default settings, load the mouse toolkit
  1075.                 (MLIBTOOL.BAS) along with your program and call the 
  1076.                 appropriate routines.
  1077.  
  1078.                 NOTE: The mouse event handler does not need to be installed
  1079.                       to use this procedure.
  1080.                 
  1081.                 For a working example see: MLIBTOOL.BAS
  1082.  
  1083.         See Also: Mouse Toolkit Routines, GetWord, PutWord, Using Constants
  1084.                 
  1085.         ---------------------------------------------------------------------
  1086.                                                             Assembly function
  1087.                                                                        
  1088.                                                                        
  1089.                                                                       
  1090.                                                                       
  1091.                                                                       
  1092.                                                                       
  1093.                                                                       
  1094.                                                                       
  1095.                                                                       
  1096.                                                                       Page 13
  1097.         
  1098.       
  1099.  
  1100.       
  1101.       
  1102.         
  1103.         
  1104.         
  1105.         
  1106.         
  1107.         
  1108.         
  1109.         
  1110.         
  1111.         
  1112.         
  1113.         
  1114.         
  1115.         
  1116.         
  1117.         
  1118.         =====================================================================
  1119.  
  1120.  
  1121.  
  1122.  
  1123.                                   Standard Routines
  1124.  
  1125.  
  1126.  
  1127.  
  1128.         =====================================================================
  1129.         
  1130.         
  1131.         
  1132.         InitPointer
  1133.         =====================================================================
  1134.  
  1135.         Initialize the mouse driver and the MLIB library.
  1136.  
  1137.         DECLARE SUB InitPointer(Buttons%)
  1138.  
  1139.         Syntax: CALL InitPointer(Buttons%)
  1140.                 
  1141.                 Buttons%   Returns the number of buttons on the mouse. If a 
  1142.                            mouse driver is not detected or there is no mouse
  1143.                            attached to the system, then the Buttons% argument 
  1144.                            returns a zero.
  1145.         
  1146.         Example:
  1147.            
  1148.                 CALL InitPointer(Buttons%)
  1149.  
  1150.                 IF Buttons% THEN
  1151.                       
  1152.                    PRINT "This mouse has "; Buttons%; " buttons."
  1153.                    
  1154.                 ELSE
  1155.                       
  1156.                    PRINT "Unable to detect a mouse."
  1157.                    
  1158.                 END IF
  1159.  
  1160.         Comments:
  1161.  
  1162.                 IMPORTANT: This routine must be called before you can access
  1163.                 any of the internal mouse routines, including both the 
  1164.                 standard and the event handling routines. You should also
  1165.                 call this routine immediately after a screen-mode change so
  1166.                 the mouse driver can adjust for the new mode setting.
  1167.                 
  1168.                 Your program can safely call any routines in this library
  1169.                 whether a mouse driver is installed or not.
  1170.                              
  1171.         ---------------------------------------------------------------------
  1172.                                                           Assembly subroutine
  1173.         
  1174.         
  1175.         
  1176.                                                                       
  1177.                                                                       
  1178.                                                                       
  1179.                                                                       
  1180.                                                                       
  1181.                                                                       
  1182.                                                                       
  1183.                                                                       
  1184.                                                                       
  1185.                                                                       
  1186.                                                                       Page 14
  1187.         
  1188.         
  1189.       
  1190.         ChangePointer                                            
  1191.         =====================================================================
  1192.  
  1193.         Change the shape of the mouse pointer (graphic modes only).
  1194.       
  1195.         DECLARE SUB ChangePointer(Shape$, HotX%, HotY%)
  1196.  
  1197.         Syntax: CALL   ChangePointer(Shape$, HotX%, HotY%)
  1198.               
  1199.                 Shape$ A 64 byte string, consisting of two 32 byte sections.
  1200.                        The first 32 bytes is the screen mask which is ANDed
  1201.                        on the screen. The last half containing the cursor
  1202.                        mask is then XORed over this. A color cursor (SOLID)
  1203.                        can have two colors, white or black, where a non-color
  1204.                        cursor (TRANS) just inverts with the colored pixels it
  1205.                        passes over.
  1206.                       
  1207.                 HotX%  Horizontal hot spot value ranging from 0 - 15.
  1208.               
  1209.                 HotY%  Vertical hot spot value ranging from 0 - 15.
  1210.  
  1211.         Example:
  1212.          
  1213.                 HotX% = 0 
  1214.                                 ' Upper left corner of new image
  1215.                 HotY% = 0
  1216.  
  1217.                 Shape$ = Arrow$ ' String containing the new image.
  1218.  
  1219.                 CALL ChangePointer(Shape$, HotX%, HotY%)
  1220.                                           
  1221.         Comments:
  1222.  
  1223.                 The mouse driver uses the hot spot coordinates to determine 
  1224.                 the location of the pointer.
  1225.       
  1226.                 For a working example see: MLIBVIEW.BAS
  1227.       
  1228.         ---------------------------------------------------------------------
  1229.                                                           Assembly subroutine
  1230.       
  1231.       
  1232.       
  1233.       
  1234.  
  1235.                                                          
  1236.                                                          
  1237.                                                          
  1238.                                                          
  1239.                                                           
  1240.                                                           
  1241.                                                           
  1242.                                                                       
  1243.                                                                       
  1244.                                                                       Page 15
  1245.         
  1246.         
  1247.       
  1248.         HidePointer
  1249.         =====================================================================
  1250.         
  1251.         Remove the mouse pointer from the screen.
  1252.  
  1253.         Use in conjunction with: ShowPointer
  1254.        
  1255.         DECLARE SUB HidePointer
  1256.        
  1257.         Syntax: CALL HidePointer
  1258.         
  1259.         Example:
  1260.         
  1261.                 CALL HidePointer ' Remove pointer before printing.
  1262.                                          
  1263.                 PRINT "A line of text."
  1264.              
  1265.                 CALL ShowPointer ' Restore after the task has been completed.
  1266.              
  1267.         Comments:
  1268.  
  1269.                 You must turn off the pointer before doing any drawing or
  1270.                 printing on the screen; this will prevent the pointer from
  1271.                 being overwritten. It should also be noted that the mouse
  1272.                 driver increments a counter each time the pointer is turned
  1273.                 off, and decrements that count for each call to turn it back
  1274.                 on. This count must equal zero before the driver will turn
  1275.                 the pointer back on. For example; if HidePointer() is called
  1276.                 3 times, then ShowPointer() must also be called 3 times 
  1277.                 before the pointer will actually become visible.
  1278.         
  1279.         See Also: ShowPointer, ShowPtrM
  1280.  
  1281.         ---------------------------------------------------------------------
  1282.                                                           Assembly subroutine
  1283.         
  1284.         ShowPointer
  1285.         =====================================================================
  1286.         
  1287.         Display the mouse pointer on the screen.
  1288.  
  1289.         Use in conjunction with: HidePointer
  1290.       
  1291.         DECLARE SUB ShowPointer
  1292.       
  1293.         Syntax: CALL ShowPointer
  1294.         
  1295.         See Also: HidePointer, ShowPtrM
  1296.  
  1297.         ---------------------------------------------------------------------
  1298.                                                           Assembly subroutine
  1299.                                                                       
  1300.                                                                       
  1301.                                                                       
  1302.                                                                       Page 16
  1303.         
  1304.         
  1305.         
  1306.         ShowPtrM
  1307.         =====================================================================
  1308.  
  1309.         Restore the mouse pointer on the screen.
  1310.  
  1311.         Use in conjunction with: GetSizeM
  1312.  
  1313.         DECLARE FUNCTION ShowPtrM%(Buffer$)
  1314.         
  1315.         Syntax: ErrNum% = ShowPtrM%(Buffer$)
  1316.                 
  1317.                 ErrNum%   If successful a value of 0 will be returned.
  1318.  
  1319.                           If unsuccessful a value of -1 will be returned
  1320.                           (Buffer$ was of insufficient size).
  1321.  
  1322.                 Buffer$   ShowPtrM% needs a working space of at least twice  
  1323.                           the size of the mouse driver's environment.  
  1324.  
  1325.         Example:
  1326.            
  1327.                 Size% = GetSizeM%           ' Amount of memory needed to hold 
  1328.                                             ' the mouse driver's environment.  
  1329.  
  1330.                 Buffer$ = SPACE$(Size% * 2) ' Pad buffer with spaces.
  1331.                 
  1332.                 ErrNum% = ShowPtrM%(Buffer$)' Restore pointer.
  1333.  
  1334.                 Buffer$ = ""                ' Release memory.
  1335.  
  1336.         Comments:
  1337.  
  1338.                 The purpose of this function is to explicitly show the
  1339.                 pointer on the screen.
  1340.  
  1341.                 If the mouse pointer has been removed from the screen an 
  1342.                 unknown number of times, calling ShowPointer() once would 
  1343.                 fail to re-show the pointer. For example: if the pointer has
  1344.                 been hidden 3 times, then the pointer would have to be shown 
  1345.                 3 times before it would actually become visible.
  1346.                 
  1347.                 NOTE: This routine requires a greater amount of time to
  1348.                 accomplish its task than ShowPointer() needs to show the
  1349.                 pointer only once.
  1350.  
  1351.         See Also: GetSizeM, ShowPointer
  1352.         
  1353.         ---------------------------------------------------------------------
  1354.                                                             Assembly function
  1355.                                                                       
  1356.                                                                       
  1357.                                                                       
  1358.                                                                       
  1359.                                                                       
  1360.                                                                       Page 17
  1361.         
  1362.         
  1363.       
  1364.         GetButtonM
  1365.         =====================================================================
  1366.  
  1367.         Get the current horizontal and vertical positon of the mouse pointer
  1368.         plus mouse button status.
  1369.       
  1370.         DECLARE SUB GetButtonM(Button%, MouseX%, MouseY%)
  1371.       
  1372.         Syntax: CALL GetButtonM(Button%, MouseX%, MouseY%)
  1373.               
  1374.                 Button%   Returns a bit-field with bits set that identify
  1375.                           which button(s) are currently pressed.
  1376.       
  1377.                 MouseX%   Returns the current horizontal position of the 
  1378.                           mouse pointer (in pixels).
  1379.  
  1380.                 MouseY%   Returns the current vertical position of the 
  1381.                           mouse pointer (in pixels).
  1382.         
  1383.         Example:            
  1384.                
  1385.                 SCREEN 0    ' Convert the virtual mouse screen coordinates
  1386.                             ' to BASIC's row/column format, in text mode.
  1387.                 DO          ' Using a character block size of 8 X 8.
  1388.  
  1389.                    CALL GetButtonM(Button%, X%, Y%)
  1390.                 
  1391.                    Row% = (Y% \ 8) + 1
  1392.                    Col% = (X% \ 8) + 1
  1393.                   
  1394.                    LOCATE 1: PRINT Row%; " X "; Col%
  1395.                  
  1396.                    IF Button% AND 1 THEN ' The left button is down.
  1397.                 
  1398.                    IF Button% AND 2 THEN ' The right button is down.
  1399.  
  1400.                    IF Button% AND 4 THEN ' The center button is down.
  1401.                    
  1402.                 LOOP UNTIL LEN(INKEY$)
  1403.  
  1404.         Comments:
  1405.  
  1406.                 Button bit-field:      Represents (when set):   Value:
  1407.                 =====================  =======================  =============
  1408.                 00000000 00000000----  Left button pressed      1
  1409.                               |`-----  Right button pressed     2
  1410.                               `------  Center button pressed    4
  1411.                 -------------------------------------------------------------
  1412.  
  1413.         ---------------------------------------------------------------------
  1414.                                                           Assembly subroutine
  1415.       
  1416.                                                                       
  1417.                                                                       
  1418.                                                                       Page 18
  1419.         
  1420.         
  1421.        
  1422.         GetPressM
  1423.         =====================================================================
  1424.  
  1425.         Get specific button press information.
  1426.                                                          
  1427.         DECLARE SUB GetPressM(Button%, Stat%, Count%, MouseX%, MouseY%)
  1428.  
  1429.         Syntax: CALL GetPressM(Button%, Stat%, Count%, MouseX%, MouseY%)
  1430.                
  1431.                 Button%   Specifies which mouse button is checked and for
  1432.                           which information is to be returned. 1 checks the
  1433.                           left button, 2 and 3 check the right and center
  1434.                           buttons respectively.
  1435.        
  1436.                 Stat%     Returns a bit-field containing the current button 
  1437.                           status. A value of 1, 2 or 4 (or a combination of) 
  1438.                           indicates the left, right or center button is 
  1439.                           currently being pressed, respectively.
  1440.                 
  1441.                 Count%    Returns the number of times the requested button 
  1442.                           has been pressed since last called.
  1443.  
  1444.                 MouseX%   Returns the horizontal position (in pixels) of the 
  1445.                           mouse pointer when the button was last pressed.
  1446.  
  1447.                 MouseY%   Returns the vertical position (in pixels) of the 
  1448.                           mouse pointer when the button was last pressed.
  1449.  
  1450.         Example:
  1451.           
  1452.                 Button% = 1 ' Check the left button.
  1453.                 
  1454.                 CALL GetPressM(Button%, Stat%, Count%, MouseX%, MouseY%)
  1455.                   
  1456.                 IF Count% > 1 THEN
  1457.                    PRINT "Left button has been pressed: "; Count%; " times"
  1458.                 END IF
  1459.  
  1460.         Comments:
  1461.  
  1462.                 NOTE: The values returned by MouseX% and MouseY% refer to the 
  1463.                 location of the pointer WHEN the mouse button was pressed, 
  1464.                 NOT the current location. The button count is automatically 
  1465.                 reset to zero each time this routine is called.
  1466.  
  1467.         See Also: GetReleaseM
  1468.        
  1469.         ---------------------------------------------------------------------
  1470.                                                           Assembly subroutine
  1471.        
  1472.        
  1473.        
  1474.        
  1475.  
  1476.                                                                       Page 19
  1477.         
  1478.         
  1479.        
  1480.         GetReleaseM
  1481.         =====================================================================
  1482.  
  1483.         Get specific button release information.
  1484.                                                          
  1485.         DECLARE SUB GetReleaseM(Button%, Stat%, Count%, MouseX%, MouseY%)
  1486.  
  1487.         Syntax: CALL GetReleaseM(Button%, Stat%, Count%, MouseX%, MouseY%)
  1488.                
  1489.                 Button%   Specifies which mouse button is checked and for
  1490.                           which information is to be returned. 1 checks the
  1491.                           left button, 2 and 3 check the right and center
  1492.                           buttons respectively.
  1493.        
  1494.                 Stat%     Returns a bit-field containing the current button 
  1495.                           status. A value of 1, 2 or 4 (or a combination of) 
  1496.                           indicates the left, right or center button is 
  1497.                           currently being pressed, respectively.
  1498.  
  1499.                 Count%    Returns the number of times the requested button 
  1500.                           has been released since last called.
  1501.  
  1502.                 MouseX%   Returns the horizontal position (in pixels) of the 
  1503.                           mouse pointer when the button was last released.
  1504.  
  1505.                 MouseY%   Returns the vertical position (in pixels) of the 
  1506.                           mouse pointer when the button was last released.
  1507.  
  1508.         Example:
  1509.           
  1510.                 Button% = 1 ' Check the left button.
  1511.                 
  1512.                 CALL GetReleaseM(Button%, Stat%, Count%, MouseX%, MouseY%)
  1513.                   
  1514.                 IF Count% > 1 THEN
  1515.                    PRINT "Left button has been released: "; Count%; " times"
  1516.                 END IF
  1517.  
  1518.         Comments:
  1519.  
  1520.                 NOTE: The values returned by MouseX% and MouseY% refer to the 
  1521.                 location of the pointer WHEN the mouse button was released, 
  1522.                 NOT the current location. The button count is automatically 
  1523.                 reset to zero each time this routine is called.
  1524.  
  1525.         See Also: GetPressM
  1526.        
  1527.         ---------------------------------------------------------------------
  1528.                                                           Assembly subroutine
  1529.        
  1530.        
  1531.        
  1532.        
  1533.  
  1534.                                                                       Page 20
  1535.         
  1536.         
  1537.         
  1538.         SetBoundM
  1539.         =====================================================================
  1540.  
  1541.         Confine pointer movement to a specified area on the screen.
  1542.  
  1543.         DECLARE SUB SetBoundM(x1%, y1%, x2%, y2%)
  1544.  
  1545.         Syntax: CALL SetBoundM(x1%, y1%, x2%, y2%)
  1546.                 
  1547.                 x1%, x2%  Left and right boundaries (in pixels).
  1548.                 
  1549.                 y1%, y2%  Top and bottom boundaries (in pixels).
  1550.         
  1551.         Example:
  1552.            
  1553.                 ' Limit pointer to an area starting in the upper left corner 
  1554.                 ' of the screen, 100 pixels wide by 100 pixels high.
  1555.  
  1556.                 CALL SetBoundM(0, 0, 100, 100)
  1557.                 
  1558.         Comments:
  1559.  
  1560.                 This routine eliminates the need of calling both SetHLimit()
  1561.                 and SetVLimit() to confine the pointer to an enclosed area.
  1562.  
  1563.         See Also: SetHLimitM, SetVLimitM.
  1564.         
  1565.         ---------------------------------------------------------------------
  1566.                                                           Assembly subroutine
  1567.                                                                       
  1568.                                                                       
  1569.                                                                       
  1570.                                                                       
  1571.                                                                       
  1572.                                                                       
  1573.                                                                       
  1574.                                                                       
  1575.                                                                       
  1576.                                                                       
  1577.                                                                       
  1578.                                                                       
  1579.                                                                       
  1580.                                                                       
  1581.                                                                       
  1582.                                                                       
  1583.                                                                       
  1584.                                                                       
  1585.                                                                       
  1586.                                                                       
  1587.                                                                       
  1588.                                                                       
  1589.                                                                       
  1590.                                                                       
  1591.                                                                       
  1592.                                                                       Page 21
  1593.         
  1594.         
  1595.     
  1596.         SetHLimitM
  1597.         =====================================================================
  1598.  
  1599.         Specify a left and right boundary in which the horizontal movement of
  1600.         the mouse pointer will be confined.
  1601.  
  1602.         Use in conjunction with: SetVLimitM
  1603.        
  1604.         DECLARE SUB SetHLimitM(X%, Y%)
  1605.       
  1606.         Syntax: CALL SetHLimitM(X%, Y%)
  1607.             
  1608.                 X%   Minimum left limit in pixels.
  1609.                
  1610.                 Y%   Maximum right limit in pixels.
  1611.  
  1612.         Example:
  1613.        
  1614.                 X1% = 0   ' Create a window in which the pointer will be
  1615.                 Y1% = 100 ' confined.
  1616.                 X2% = 0  
  1617.                 Y2% = 100
  1618.  
  1619.                 CALL SetHLimitM(X1%, Y1%)
  1620.                
  1621.                 CALL SetVLimitM(X2%, Y2%)
  1622.                                         
  1623.         Comments:
  1624.  
  1625.                 If the left value is greater than the right value, this
  1626.                 routine will exchange the two. The pointer will then be
  1627.                 displayed within these two boundaries.
  1628.  
  1629.         See Also: SetVLimitM, SetBoundM
  1630.     
  1631.         ---------------------------------------------------------------------
  1632.                                                           Assembly subroutine
  1633.                                                                       
  1634.                                                                       
  1635.                                                                       
  1636.                                                                       
  1637.                                                                       
  1638.                                                                       
  1639.                                                                       
  1640.                                                                       
  1641.                                                                       
  1642.                                                                       
  1643.                                                                       
  1644.                                                                       
  1645.                                                                       
  1646.                                                                       
  1647.                                                                       
  1648.                                                                       
  1649.                                                                       
  1650.                                                                       Page 22
  1651.         
  1652.         
  1653.      
  1654.         SetVLimitM
  1655.         =====================================================================
  1656.        
  1657.         Specify an upper and lower boundary in which the vertical movement of
  1658.         the mouse pointer will be confined.
  1659.  
  1660.         Use in conjunction with: SetHLimitM
  1661.         
  1662.         DECLARE SUB SetVLimitM(X%, Y%)
  1663.        
  1664.         Syntax: CALL SetVLimitM(X%, Y%)
  1665.              
  1666.                 X%   Minimum upper limit in pixels.
  1667.                 
  1668.                 Y%   Maximum lower limit in pixels.
  1669.  
  1670.         Example:
  1671.         
  1672.                 X1% = 0   ' Create a window in which the pointer will be
  1673.                 Y1% = 100 ' confined.
  1674.                 X2% = 0  
  1675.                 Y2% = 100
  1676.  
  1677.                 CALL SetHLimitM(X1%, Y1%)
  1678.                
  1679.                 CALL SetVLimitM(X2%, Y2%)
  1680.                                          
  1681.         Comments:
  1682.  
  1683.                 If the upper value is greater than the lower value, this
  1684.                 routine will exchange the two. The pointer will then be
  1685.                 displayed within these two boundaries.
  1686.  
  1687.         See Also: SetHLimitM, SetBoundM
  1688.      
  1689.         ---------------------------------------------------------------------
  1690.                                                           Assembly subroutine
  1691.                                                                       
  1692.                                                                       
  1693.                                                                       
  1694.                                                                       
  1695.                                                                       
  1696.                                                                       
  1697.                                                                       
  1698.                                                                       
  1699.                                                                       
  1700.                                                                       
  1701.                                                                       
  1702.                                                                       
  1703.                                                                       
  1704.                                                                       
  1705.                                                                       
  1706.                                                                       
  1707.                                                                       
  1708.                                                                       Page 23
  1709.         
  1710.         
  1711.         
  1712.         SetPointer
  1713.         =====================================================================
  1714.  
  1715.         Display the mouse pointer at a new location.
  1716.         
  1717.         DECLARE SUB SetPointer(X%, Y%)
  1718.         
  1719.         Syntax: CALL SetPointer(X%, Y%)
  1720.                 
  1721.                 X%   New horizontal position, in pixels.
  1722.  
  1723.                 Y%   New vertical position, in pixels.
  1724.  
  1725.         Example:
  1726.            
  1727.                 X% = 0 ' Place the pointer in the upper left corner of the
  1728.                        ' screen.
  1729.                 Y% = 0
  1730.                    
  1731.                 CALL SetPointer(X%, Y%)
  1732.              
  1733.         Comments:
  1734.                 
  1735.                 If X% or Y% are outside of any defined boundary, such as off
  1736.                 the screen, the mouse driver will automatically place the
  1737.                 pointer to the nearest legal position within this boundary.
  1738.         
  1739.         ---------------------------------------------------------------------
  1740.                                                           Assembly subroutine
  1741.         
  1742.         
  1743.  
  1744.                                                            
  1745.                                                            
  1746.                                                            
  1747.                                                            
  1748.                                                            
  1749.                                                            
  1750.                                                            
  1751.                                                            
  1752.                                                            
  1753.                                                            
  1754.                                                            
  1755.                                                            
  1756.                                                            
  1757.                                                            
  1758.                                                            
  1759.                                                            
  1760.                                                            
  1761.                                                            
  1762.                                                                       
  1763.                                                                       
  1764.                                                                       
  1765.                                                                       
  1766.                                                                       Page 24
  1767.         
  1768.         
  1769.      
  1770.         GetSpeedM
  1771.         =====================================================================
  1772.  
  1773.         Get the rate settings at which the pointer travels across the screen.
  1774.  
  1775.         Use in conjunction with: SetSpeedM
  1776.       
  1777.         DECLARE SUB CALL GetSpeedM(H%, V%, D%)
  1778.  
  1779.         Syntax: CALL GetSpeedM(H%, V%, D%)
  1780.              
  1781.                 H%   Returns the current horizontal value.
  1782.                 
  1783.                 V%   Returns the current vertical value.
  1784.                 
  1785.                 D%   Returns double speed threshold value.
  1786.  
  1787.         Example:
  1788.         
  1789.                 ' Get and save the current sensitivity state of the mouse.
  1790.                 ' Upon ending your program, pass these values to the routine
  1791.                 ' SetSpeedM(), which will restore the settings back to their
  1792.                 ' original state.
  1793.              
  1794.                 ' Program startup.
  1795.                                                         
  1796.                 CALL GetSpeedM(SaveH%, SaveV%, SaveD%) ' Save old settings.
  1797.                 CALL SetSpeedM(50, 50, 50)             ' New setting for your
  1798.                                                        ' program's use.
  1799.                 ' Program code.
  1800.              
  1801.                 CALL SetSpeedM(SaveH%, SaveV%, SaveD%) ' Restore setting.
  1802.  
  1803.                 ' End of program.
  1804.              
  1805.         Comments:
  1806.  
  1807.                 Mouse sensitivity is defined as how far the pointer moves
  1808.                 per actual movement of the mouse itself. The higher the
  1809.                 values in X%, Y%, the greater the sensitivity (or rate of 
  1810.                 travel).
  1811.  
  1812.         See Also: SetSpeedM        
  1813.      
  1814.         ---------------------------------------------------------------------
  1815.                                                           Assembly subroutine
  1816.                                                                       
  1817.                                                                       
  1818.                                                                       
  1819.                                                                       
  1820.                                                                       
  1821.                                                                       
  1822.                                                                       
  1823.                                                                       
  1824.                                                                       Page 25
  1825.         
  1826.         
  1827.     
  1828.         SetSpeedM
  1829.         =====================================================================
  1830.  
  1831.         Set the rate at which the pointer travels across the screen.
  1832.  
  1833.         Use in conjunction with: GetSpeedM
  1834.      
  1835.         DECLARE SUB CALL SetSpeedM(H%, V%, D%)
  1836.  
  1837.         Syntax: CALL SetSpeedM(H%, V%, D%)
  1838.             
  1839.                 H%   New horizontal value (1 - 100).
  1840.                
  1841.                 V%   New vertical value (1 - 100).
  1842.                
  1843.                 D%   New double speed threshold (1 - 100).
  1844.  
  1845.         Example:
  1846.        
  1847.                 ' Get and save the current sensitivity state of the mouse.
  1848.                 ' Upon ending your program, pass these values to the routine
  1849.                 ' SetSpeedM(), which will restore the settings back to their
  1850.                 ' original state.
  1851.              
  1852.                 ' Program startup.
  1853.                                                         
  1854.                 CALL GetSpeedM(SaveH%, SaveV%, SaveD%) ' Save old settings.
  1855.                 CALL SetSpeedM(50, 50, 50)             ' New setting for your
  1856.                                                        ' program's use.
  1857.                 ' Program code.
  1858.              
  1859.                 CALL SetSpeedM(SaveH%, SaveV%, SaveD%) ' Restore setting.
  1860.  
  1861.                 ' End of program.
  1862.             
  1863.         Comments:
  1864.  
  1865.                 Mouse sensitivity is defined as how far the pointer moves
  1866.                 per actual movement of the mouse itself. The higher the
  1867.                 values in X%, Y%, the greater the sensitivity (or rate of 
  1868.                 travel).
  1869.     
  1870.         See Also: GetSpeedM
  1871.  
  1872.         ---------------------------------------------------------------------
  1873.                                                           Assembly subroutine
  1874.                                                                       
  1875.                                                                       
  1876.                                                                       
  1877.                                                                       
  1878.                                                                       
  1879.                                                                       
  1880.                                                                       
  1881.                                                                       
  1882.                                                                       Page 26
  1883.         
  1884.          
  1885.       
  1886.         GetMotionM
  1887.         =====================================================================
  1888.  
  1889.         Get the mouse pointer's direction of travel.
  1890.  
  1891.         DECLARE SUB GetMotionM(MouseX%, MouseY%)
  1892.        
  1893.         Syntax: CALL GetMotionM(MouseX%, MouseY%)
  1894.               
  1895.                 MouseX%  Returns the horizontal value.
  1896.                  
  1897.                 MouseY%  Returns the vertical value.
  1898.                
  1899.         Example:
  1900.                   
  1901.                 DO
  1902.              
  1903.                    CALL GetMotionM(MouseX%, MouseY%)
  1904.                
  1905.                    Direction$ = ""
  1906.                
  1907.                    IF MouseX% > 0 THEN Direction$ = "Right" ' If positive.
  1908.                    IF MouseX% < 0 THEN Direction$ = "Left " ' If negative.
  1909.                    IF MouseY% > 0 THEN Direction$ = "Down " ' If positive.
  1910.                    IF MouseY% < 0 THEN Direction$ = "Up   " ' If negative.
  1911.                
  1912.                    IF LEN(Direction$) THEN
  1913.                     
  1914.                       LOCATE 5
  1915.                     
  1916.                       PRINT Direction$
  1917.                  
  1918.                    END IF
  1919.  
  1920.                 LOOP UNTIL LEN(INKEY$)
  1921.               
  1922.         Comments:
  1923.  
  1924.                 The values returned will range from -32768 to 32768. Positive 
  1925.                 values show right or downward movement, and negative values 
  1926.                 show left or upward movement.
  1927.                  
  1928.         ---------------------------------------------------------------------
  1929.                                                           Assembly subroutine
  1930.       
  1931.       
  1932.       
  1933.  
  1934.                                                           
  1935.                                                           
  1936.                                                           
  1937.                                                            
  1938.                                                            
  1939.                                                            
  1940.                                                                       Page 27
  1941.         
  1942.         
  1943.         
  1944.         GetSizeM
  1945.         =====================================================================
  1946.  
  1947.         Get the size the mouse driver's environment.
  1948.         
  1949.         Use in conjunction with: ShowPtrM%, SaveStateM
  1950.  
  1951.         DECLARE FUNCTION GetSizeM%
  1952.         
  1953.         Syntax: Size% = GetSizeM%
  1954.                 
  1955.                 Size%   Returns the size of the mouse driver's environment  
  1956.                         (in bytes).
  1957.  
  1958.         Example:
  1959.            
  1960.                 Size% = GetSizeM% ' Amount of memory needed to hold the 
  1961.                                   ' mouse driver's  environment.  
  1962.  
  1963.                 Buffer$ = SPACE$(Size% * 2) ' Pad buffer with spaces.
  1964.                 
  1965.                 ErrNum% = ShowPtrM%(Buffer$)
  1966.  
  1967.                 Buffer$ = ""                ' Release memory.
  1968.  
  1969.         Comments:
  1970.  
  1971.                 Use this function to determine buffer size needed by both 
  1972.                 ShowPtrM% () and SaveStateM().
  1973.  
  1974.         See Also: ShowPtrM%, RestoreStateM, SaveStateM
  1975.  
  1976.         ---------------------------------------------------------------------
  1977.                                                             Assembly function
  1978.                                                                       
  1979.                                                                       
  1980.                                                                       
  1981.                                                                       
  1982.                                                                       
  1983.                                                                       
  1984.                                                                       
  1985.                                                                       
  1986.                                                                       
  1987.                                                                       
  1988.                                                                       
  1989.                                                                       
  1990.                                                                       
  1991.                                                                       
  1992.                                                                       
  1993.                                                                       
  1994.                                                                       
  1995.                                                                       
  1996.                                                                       
  1997.                                                                       
  1998.                                                                       Page 28
  1999.         
  2000.         
  2001.         
  2002.         SaveStateM
  2003.         =====================================================================
  2004.  
  2005.         Save the mouse driver's environment.
  2006.  
  2007.         Use in conjunction with: GetSizeM, RestoreStateM
  2008.  
  2009.         DECLARE SUB SaveStateM(Buffer$, ErrNum%)
  2010.         
  2011.         Syntax: CALL SaveStateM(Buffer$, ErrNum%)
  2012.                 
  2013.                 Buffer$   Buffer in which the mouse driver's environment  
  2014.                           will be stored.  
  2015.  
  2016.                 ErrNum%   Returns a -1, if Buffer$ is not large enough to 
  2017.                           hold the mouse environment.
  2018.         
  2019.         Example:
  2020.            
  2021.                 ' Amount of memory needed to hold the mouse state.
  2022.                 Size% = GetSizeM%                
  2023.                                                   
  2024.                 Buffer$ = SPACE$(Size%)           ' Pad buffer with spaces.
  2025.                 
  2026.                 CALL SaveStateM(Buffer$, ErrNum%) ' Save mouse state.
  2027.  
  2028.                 CALL HidePointer
  2029.  
  2030.                 SHELL"XXXX"                          ' Pass control.
  2031.  
  2032.                 CALL ShowPointer
  2033.  
  2034.                 CALL RestoreStateM(Buffer$, ErrNum%) ' Restore state.
  2035.  
  2036.         Comments:
  2037.  
  2038.                 If your program needs to temporarily pass control to another
  2039.                 program or procedure that also uses the mouse and where the 
  2040.                 mouse state may be altered (such as a video mode change), use 
  2041.                 GetSizeM% () along with this subroutine, to save the mouse 
  2042.                 state first before passing control. When your program has 
  2043.                 regained control, use RestoreStateM() to restore the driver's 
  2044.                 state.
  2045.         
  2046.         See Also: GetSizeM, RestoreStateM 
  2047.  
  2048.         ---------------------------------------------------------------------
  2049.                                                           Assembly subroutine
  2050.                                                                       
  2051.                                                                       
  2052.                                                                       
  2053.                                                                       
  2054.                                                                       
  2055.                                                                       
  2056.                                                                       Page 29
  2057.         
  2058.         
  2059.         
  2060.         RestoreStateM
  2061.         =====================================================================
  2062.  
  2063.         Restore mouse environment.
  2064.  
  2065.         Use in conjunction with: GetSizeM, SaveStateM
  2066.         
  2067.         DECLARE SUB RestoreStateM(Buffer$, ErrNum%)
  2068.         
  2069.         Syntax: CALL RestoreStateM(Buffer$, ErrNum%)
  2070.                 
  2071.                 Buffer$   Contains a previously saved mouse state.
  2072.                 
  2073.                 ErrNum%   Returns a -1, if Buffer$ is smaller than the mouse 
  2074.                           environment.
  2075.         
  2076.         Example:
  2077.            
  2078.                 ' Amount of memory needed to hold the mouse state.
  2079.                 Size% = GetSizeM%                
  2080.                                                   
  2081.                 Buffer$ = SPACE$(Size%)           ' Pad buffer with spaces.
  2082.                 
  2083.                 CALL SaveStateM(Buffer$, ErrNum%) ' Save mouse state.
  2084.  
  2085.                 CALL HidePointer
  2086.  
  2087.                 SHELL"XXXX"                          ' Pass control.
  2088.  
  2089.                 CALL ShowPointer
  2090.  
  2091.                 CALL RestoreStateM(Buffer$, ErrNum%) ' Restore state.
  2092.  
  2093.         Comments:
  2094.  
  2095.                 You must have used the SaveStateM() routine to save the mouse
  2096.                 state in Buffer$ before calling this routine.
  2097.                 
  2098.         See Also: GetSizeM, SaveStateM 
  2099.  
  2100.         ---------------------------------------------------------------------
  2101.                                                           Assembly subroutine
  2102.                                                                       
  2103.                                                                       
  2104.                                                                       
  2105.                                                                       
  2106.                                                                       
  2107.                                                                       
  2108.                                                                       
  2109.                                                                       
  2110.                                                                       
  2111.                                                                       
  2112.                                                                       
  2113.                                                                       
  2114.                                                                       Page 30
  2115.         
  2116.         
  2117.        
  2118.         Sample Pointer Shapes
  2119.         =====================================================================
  2120.  
  2121.         Change the shape of the mouse pointer (graphics only).
  2122.        
  2123.         DECLARE SUB  <shape name>
  2124.         
  2125.         Syntax: CALL <shape name>
  2126.         
  2127.                 ARROW0
  2128.                 HANDV0
  2129.                 HOURGLASS0
  2130.                 PEN0
  2131.                 MAGNIFYGLASS0
  2132.                 PAINTCUP0
  2133.                 MOUSE0
  2134.                 WHATCH0
  2135.                 ARROW1
  2136.                 
  2137.         Example:
  2138.           
  2139.                 CALL HANDV0 'Change pointer to a hand shape.
  2140.         
  2141.         
  2142.         Comments:
  2143.  
  2144.                 A zero appended to a shape name denotes a color pointer, A
  2145.                 one(1) denotes inverted or non-colored pointer.
  2146.         
  2147.         ---------------------------------------------------------------------
  2148.                                                             Assembly routines
  2149.        
  2150.        
  2151.                                                           
  2152.                                                           
  2153.                                                           
  2154.                                                           
  2155.                                                            
  2156.                                                            
  2157.                                                            
  2158.                                                            
  2159.                                                            
  2160.                                                            
  2161.                                                            
  2162.                                                            
  2163.                                                                       
  2164.                                                                       
  2165.                                                                       
  2166.                                                                       
  2167.                                                                       
  2168.                                                                       
  2169.                                                                       
  2170.                                                                       
  2171.                                                                       
  2172.                                                                       Page 31
  2173.         
  2174.       
  2175.  
  2176.       
  2177.       
  2178.         
  2179.         
  2180.         
  2181.         
  2182.         
  2183.         
  2184.         
  2185.         
  2186.         
  2187.         
  2188.         
  2189.         
  2190.         
  2191.         
  2192.         
  2193.         
  2194.         =====================================================================
  2195.  
  2196.  
  2197.  
  2198.  
  2199.                               Mouse Toolkit Routines
  2200.  
  2201.  
  2202.  
  2203.  
  2204.         =====================================================================
  2205.         
  2206.         
  2207.       
  2208.         InMouseState
  2209.         =====================================================================
  2210.  
  2211.         Returns the status of the event handler.
  2212.       
  2213.         DECLARE FUNCTION InMouseState% ()
  2214.  
  2215.         Syntax: Value% = InMouseState%
  2216.  
  2217.                 Value%   A bit-field argument with bits reflecting the status
  2218.                          of the event handler.
  2219.  
  2220.                          Status Values: 0 - Handler is not installed
  2221.                                         2 - Handler is enabled
  2222.                                         4 - Handler is disabled
  2223.         Example: 
  2224.         
  2225.                 Value% = InMouseState%
  2226.  
  2227.                 IF Value% = 0 THEN   PRINT "Handler is not installed"
  2228.                 IF Value% AND 2 THEN PRINT "Handler is enabled"
  2229.                 IF Value% AND 4 THEN PRINT "Handler is disabled"
  2230.         
  2231.         Comments: For a working example see: MLIBSAM6.BAS
  2232.  
  2233.         ---------------------------------------------------------------------
  2234.                                                                BASIC function
  2235.         
  2236.         
  2237.         GetEventsPending
  2238.         =====================================================================
  2239.  
  2240.         Returns the number of mouse events currently pending in the buffer.
  2241.       
  2242.         DECLARE FUNCTION GetEventsPending% ()
  2243.  
  2244.         Syntax: Value% = GetEventsPending%
  2245.  
  2246.                 Value%   The number of mouse events currently waiting in the 
  2247.                          event buffer.
  2248.         
  2249.         Example: For a working example see: MLIBSAM6.BAS
  2250.  
  2251.         Comments: Use InMouseHandler() to clear events from the buffer.
  2252.  
  2253.         See Also: InMouseHandler, Clearing the Event Buffer
  2254.                 
  2255.         ---------------------------------------------------------------------
  2256.                                                                BASIC function
  2257.  
  2258.  
  2259.       
  2260.                                                                       
  2261.                                                                       
  2262.                                                                       Page 32
  2263.         
  2264.          
  2265.       
  2266.         GetEventMask
  2267.         =====================================================================
  2268.  
  2269.         Returns current event mask.
  2270.       
  2271.         Use in conjunction with: SetEventMask
  2272.         
  2273.         DECLARE SUB GetEventMask(Mask%)
  2274.  
  2275.         Syntax: CALL GetEventMask(Mask%)
  2276.                 
  2277.                 Mask%   A bit-field argument with bits corresponding to
  2278.                         mouse events that are currently being captured.
  2279.  
  2280.  
  2281.         Example:
  2282.                 
  2283.                 ' Get and save the current event mask.
  2284.                 CALL GetEventMask(OldMask%)
  2285.  
  2286.                 ' Set mouse movement bit.
  2287.                 NewMask% = OldMask% OR 1
  2288.  
  2289.                 ' Tell the event handler to begin capturing mouse movement.
  2290.                 CALL SetEventMask(NewMask%)
  2291.  
  2292.                 ' Do something that requires mouse movement.
  2293.                 ' .
  2294.                 ' .
  2295.                 ' .
  2296.                 
  2297.                 ' Restore the original event mask.
  2298.                 CALL GetEventMask(OldMask%)
  2299.                 
  2300.         Comments: 
  2301.                 
  2302.                 Use this procedure and SetEventMask() when you need to alter
  2303.                 the events currently being captured. See the Event bit-field
  2304.                 table, under the InMouse heading. This table shows all the
  2305.                 different mouse events that can be captured.
  2306.  
  2307.                 For a working example see: MLIBSAM6.BAS
  2308.  
  2309.         See Also: SetEventMask
  2310.                 
  2311.         ---------------------------------------------------------------------
  2312.                                                              BASIC subroutine
  2313.                                                                       
  2314.                                                                       
  2315.                                                                       
  2316.                                                                       
  2317.                                                                       
  2318.                                                                       
  2319.                                                                       
  2320.                                                                       Page 33
  2321.         
  2322.         
  2323.       
  2324.         SetEventMask
  2325.         =====================================================================
  2326.  
  2327.         Informs the mouse event handler to begin capturing specified events.
  2328.       
  2329.         Use in conjunction with: GetEventMask
  2330.         
  2331.         DECLARE SUB SetEventMask(Mask%)
  2332.  
  2333.         Syntax: CALL SetEventMask(Mask%)
  2334.                 
  2335.                 Mask%   A bit-field argument that specifies which mouse
  2336.                         events are to be captured.
  2337.  
  2338.         Example:
  2339.                 
  2340.                 ' Get and save the current event mask.
  2341.                 CALL GetEventMask(OldMask%)
  2342.  
  2343.                 ' Set mouse movement bit.
  2344.                 NewMask% = OldMask% OR 1
  2345.  
  2346.                 ' Tell the event handler to begin capturing mouse movement.
  2347.                 CALL SetEventMask(NewMask%)
  2348.  
  2349.                 ' Do something that requires mouse movement.
  2350.                 ' .
  2351.                 ' .
  2352.                 ' .
  2353.                 
  2354.                 ' Restore the original event mask.
  2355.                 CALL GetEventMask(OldMask%)
  2356.                 
  2357.         Comments: 
  2358.                 
  2359.                 Use this procedure and GetEventMask() when you need to alter
  2360.                 the events currently being captured. See the Event bit-field
  2361.                 table, under the InMouse heading. This table shows all the
  2362.                 different mouse events that can be captured.
  2363.  
  2364.                 For a working example see: MLIBSAM6.BAS
  2365.  
  2366.         See Also: GetEventMask
  2367.                 
  2368.         ---------------------------------------------------------------------
  2369.                                                              BASIC subroutine
  2370.                                                                       
  2371.                                                                       
  2372.                                                                       
  2373.                                                                       
  2374.                                                                       
  2375.                                                                       
  2376.                                                                       
  2377.                                                                       
  2378.                                                                       Page 34
  2379.         
  2380.          
  2381.       
  2382.         GetDblClkSettings
  2383.         =====================================================================
  2384.  
  2385.         Returns current double-click settings.
  2386.       
  2387.         DECLARE SUB GetDblClkSettings(ClickS%, ClickW%, ClickH%)
  2388.  
  2389.         Syntax: CALL GetDblClkSettings(ClickS%, ClickW%, ClickH%)
  2390.                 
  2391.                 ClickS%   Time frame in which the event handler will register 
  2392.                           a double-click.
  2393.  
  2394.                 ClickW%   Specifies the width (in pixels, on either side)
  2395.                           that the pointer can move between clicks when 
  2396.                           double-clicking.
  2397.                 
  2398.                 ClickH%   Specifies the height (in pixels, above and below)
  2399.                           that the pointer can move between clicks when 
  2400.                           double-clicking.
  2401.  
  2402.         Example:
  2403.                 
  2404.                 ' Save current settings.
  2405.                 CALL GetDblClkSettings(OldClickS%, OldClickW%, OldClickH%) 
  2406.  
  2407.                 ClickS% = 9 ' Allow 1/2 second in which a double-click will 
  2408.                               be registered.
  2409.                 
  2410.                 ClickW% = 4 ' Allow 8 pixels in total of horizontal pointer
  2411.                               pointer movement.
  2412.                 
  2413.                 ClickH% = 4 ' Allow 8 pixels in total of vertical pointer
  2414.                               pointer movement.
  2415.                 
  2416.                 ' Use the new settings.
  2417.                 CALL SetDblClkSettings(ClickS%, ClickW%, ClickH%)
  2418.                 
  2419.         Comments: 
  2420.                 
  2421.                 There are 18 (approx.) clock ticks per second.
  2422.  
  2423.                 Default double-click settings: 6 - Double-click speed
  2424.                                                2 - Double-click width
  2425.                                                2 - Double-click height
  2426.                 
  2427.                 For a working example see: MLIBSAM6.BAS
  2428.  
  2429.         See Also: SetDblClkSettings
  2430.                 
  2431.         ---------------------------------------------------------------------
  2432.                                                              BASIC subroutine
  2433.                                                                       
  2434.                                                                       
  2435.                                                                       
  2436.                                                                       Page 35
  2437.         
  2438.            
  2439.       
  2440.         SetDblClkSettings
  2441.         =====================================================================
  2442.  
  2443.         Change current double-click settings.
  2444.       
  2445.         DECLARE SUB SetDblClkSettings(ClickS%, ClickW%, ClickH%)
  2446.  
  2447.         Syntax: CALL SetDblClkSettings(ClickS%, ClickW%, ClickH%)
  2448.                 
  2449.                 ClickS%   Time frame in which the event handler will register 
  2450.                           a double-click.
  2451.  
  2452.                 ClickW%   Specifies the width (in pixels, on either side)
  2453.                           that the pointer can move between clicks when 
  2454.                           double-clicking.
  2455.                 
  2456.                 ClickH%   Specifies the height (in pixels, above and below)
  2457.                           that the pointer can move between clicks when 
  2458.                           double-clicking.
  2459.  
  2460.         Example:
  2461.                 
  2462.                 ' Save current settings.
  2463.                 CALL GetDblClkSettings(OldClickS%, OldClickW%, OldClickH%) 
  2464.  
  2465.                 ClickS% = 9 ' Allow 1/2 second in which a double-click will 
  2466.                               be registered.
  2467.                 
  2468.                 ClickW% = 4 ' Allow 8 pixels in total of horizontal pointer
  2469.                               pointer movement.
  2470.                 
  2471.                 ClickH% = 4 ' Allow 8 pixels in total of vertical pointer
  2472.                               pointer movement.
  2473.                 
  2474.                 ' Use the new settings.
  2475.                 CALL SetDblClkSettings(ClickS%, ClickW%, ClickH%)
  2476.                 
  2477.         Comments: 
  2478.                 
  2479.                 There are 18 (approx.) clock ticks per second.
  2480.  
  2481.                 Default double-click settings: 6 - Double-click speed
  2482.                                                2 - Double-click width
  2483.                                                2 - Double-click height
  2484.                 
  2485.                 For a working example see: MLIBSAM6.BAS
  2486.  
  2487.         See Also: GetDblClkSettings
  2488.                 
  2489.         ---------------------------------------------------------------------
  2490.                                                              BASIC subroutine
  2491.                                                                       
  2492.                                                                       
  2493.                                                                       
  2494.                                                                       Page 36
  2495.         
  2496.         
  2497.       
  2498.         InMouseSave
  2499.         =====================================================================
  2500.  
  2501.         Save the event handler's state.
  2502.  
  2503.         Use in conjunction with: InMouseRestore
  2504.       
  2505.         DECLARE SUB InMouseSave(Buffer$)
  2506.  
  2507.         Syntax: CALL InMouseSave(Buffer$)
  2508.               
  2509.                 Buffer$   Returns a 132 byte string containing the event 
  2510.                           handler's internal data storage block.
  2511.  
  2512.         Example: For a working example see: MLIBSAM6.BAS
  2513.  
  2514.         Comments: Use this procedure to save the current instance of the
  2515.                   event handler before performing some task that may alter
  2516.                   some or all internal settings.
  2517.  
  2518.         See Also: InMouseRestore, SaveStateM, RestoreStateM
  2519.                 
  2520.         ---------------------------------------------------------------------
  2521.                                                              BASIC subroutine
  2522.                                 
  2523.  
  2524.         InMouseRestore
  2525.         =====================================================================
  2526.  
  2527.         Restore a previously saved instance of the event handler.
  2528.  
  2529.         Use in conjunction with: InMouseRestore
  2530.       
  2531.         DECLARE SUB InMouseSave(Buffer$)
  2532.  
  2533.         Syntax: CALL InMouseRestore(Buffer$)
  2534.               
  2535.                 Buffer$   Contains the event handler's internal data storage 
  2536.                           block.
  2537.                 
  2538.         Example: For a working example see: MLIBSAM6.BAS
  2539.  
  2540.         Comments: IMPORTANT: InMouseSave() and InMouseRestore() save and
  2541.                   restore the event handler's state, NOT the mouse driver's
  2542.                   state.
  2543.  
  2544.         See Also: InMouseSave, SaveStateM, RestoreStateM
  2545.                 
  2546.         ---------------------------------------------------------------------
  2547.                                                              BASIC subroutine
  2548.  
  2549.       
  2550.       
  2551.                                                                       
  2552.                                                                       Page 37
  2553.         
  2554.       
  2555.  
  2556.       
  2557.       
  2558.         
  2559.         
  2560.         
  2561.         
  2562.         
  2563.         
  2564.         
  2565.         
  2566.         
  2567.         
  2568.         
  2569.         
  2570.         
  2571.         
  2572.         
  2573.         
  2574.         =====================================================================
  2575.  
  2576.  
  2577.  
  2578.  
  2579.                                 Additional Routines
  2580.  
  2581.  
  2582.  
  2583.  
  2584.         =====================================================================
  2585.         
  2586.         
  2587.  
  2588.         CviBin
  2589.         =====================================================================
  2590.         
  2591.         Returns a binary string representation of a decimal value.
  2592.  
  2593.         DECLARE FUNCTION CviBin$ (BYVAL Value%)
  2594.  
  2595.         Syntax: Binary$ = CviBin$ (Value%)
  2596.  
  2597.                 Binary$   Returns a 16 byte string that represents the binary 
  2598.                           value of the passed argument.
  2599.  
  2600.                 Value%    Value to convert.
  2601.  
  2602.  
  2603.         Example: For a working example see: MLIBSAM6.BAS
  2604.  
  2605.         Comments: The returned string is always 16 bytes in length, even if
  2606.                   the passed argument's value was zero.
  2607.  
  2608.         ---------------------------------------------------------------------
  2609.                                                             Assembly function
  2610.  
  2611.  
  2612.  
  2613.         CvsBin
  2614.         =====================================================================
  2615.  
  2616.         Converts a binary string representation into a decimal value.
  2617.  
  2618.         DECLARE FUNCTION CvsBin% (Binary$)
  2619.  
  2620.         Syntax: Value% = CvsBin% (Binary$)
  2621.  
  2622.                 Value%   Returned decimal value.
  2623.                 
  2624.                 Binary$  A 16 byte string that represents a 16 bit binary
  2625.                          value.
  2626.                 
  2627.         Example: For a working example see: MLIBSAM6.BAS
  2628.  
  2629.         Comments: The string passed to this routine must be 16 bytes in 
  2630.                   length.
  2631.  
  2632.         ---------------------------------------------------------------------
  2633.                                                             Assembly function
  2634.  
  2635.  
  2636.                                                                       
  2637.                                                                       
  2638.                                                                       
  2639.                                                                       
  2640.                                                                       
  2641.                                                                       
  2642.                                                                       Page 38
  2643.         
  2644.           
  2645.  
  2646.         GetWord
  2647.         =====================================================================
  2648.  
  2649.         Returns two bytes from specified memory location.
  2650.  
  2651.         DECLARE FUNCTION GetWord% (BYVAL Segment%, BYVAL Offset%)
  2652.  
  2653.         Syntax: Value% = GetWord(Segment%, Offset%)
  2654.  
  2655.                 Value%     Returned value from specified memory location.
  2656.                 
  2657.                 Segment%   Source segment part of address.
  2658.  
  2659.                 Offset%    Source offset part of address.
  2660.                 
  2661.         Example: For a working example see: MLIBTOOL.BAS
  2662.  
  2663.         Comments: Use this routine when you need to read two bytes at one
  2664.                   time, it will be faster than using BASIC's PEEK function
  2665.                   twice.
  2666.  
  2667.         ---------------------------------------------------------------------
  2668.                                                             Assembly function
  2669.  
  2670.  
  2671.  
  2672.         PutWord
  2673.         =====================================================================
  2674.  
  2675.         Writes two bytes to specified memory location.
  2676.  
  2677.         DECLARE SUB PutWord(BYVAL Segment%, BYVAL Offset%, BYVAL Value%)
  2678.  
  2679.         Syntax: CALL PutWord(Segment%, Offset%, Value%)
  2680.  
  2681.                 Segment%   Destination segment part of address.
  2682.  
  2683.                 Offset%    Destination offset part of address.
  2684.  
  2685.                 Value%     Value to write to specified memory location.
  2686.                 
  2687.         Example: For a working example see: MLIBTOOL.BAS
  2688.  
  2689.         Comments: Use this routine when you need to write two bytes at one
  2690.                   time, it will be faster than using BASIC's POKE statement 
  2691.                   twice.
  2692.  
  2693.         ---------------------------------------------------------------------
  2694.                                                           Assembly subroutine
  2695.  
  2696.  
  2697.                                                                       
  2698.                                                                       
  2699.                                                                       
  2700.                                                                       Page 39
  2701.         
  2702.          
  2703.         
  2704.         InWinM
  2705.         =====================================================================
  2706.  
  2707.         Check if pointer is in a specified area on the screen. 
  2708.         
  2709.         DECLARE FUNCTION InWinM% (BYVAL x1%, BYVAL y1%, BYVAL x2%, BYVAL y2%)
  2710.  
  2711.         Syntax: Value% = InWinM(x1%, y1%, x2%, y2%)
  2712.                 
  2713.                 Value%    Returns a -1 if true, else 0.
  2714.  
  2715.                 x1%, x2%  Left and right boundaries (in pixels).
  2716.                 
  2717.                 y1%, y2%  Top and bottom boundaries (in pixels).
  2718.                 
  2719.         Example:
  2720.                 
  2721.                 ' $INCLUDE: 'MLIB.BI'
  2722.  
  2723.                 SCREEN 12
  2724.  
  2725.                 CALL InitPointer(X%)
  2726.                 CALL SetPointer(0, 0)
  2727.  
  2728.                 x1% = 0
  2729.                 y1% = 0
  2730.                 x2% = 100
  2731.                 y2% = 100
  2732.  
  2733.                 LINE (x1%, y1%)-(x2%, y2%), , B
  2734.  
  2735.                 CALL ShowPointer
  2736.  
  2737.                 ' Loop while pointer is in the given coordinates.
  2738.                 DO
  2739.  
  2740.                    InIt% = InWinM(x1%, y1%, x2%, y2%)
  2741.  
  2742.                 LOOP WHILE InIt%
  2743.  
  2744.                 SCREEN 0
  2745.                 
  2746.         Comments:
  2747.  
  2748.                 BYVAL is used here for speed.             
  2749.                 
  2750.                 NOTE: This function will not work properly using a screen
  2751.                       resolution of 320 X 200.
  2752.  
  2753.         ---------------------------------------------------------------------
  2754.                                                             Assembly function
  2755.         
  2756.         
  2757.         
  2758.                                                                       Page 40
  2759.         
  2760.       
  2761.  
  2762.       
  2763.       
  2764.         
  2765.         
  2766.         
  2767.         
  2768.         
  2769.         
  2770.         
  2771.         
  2772.         
  2773.         
  2774.         
  2775.         
  2776.         
  2777.         
  2778.         
  2779.         
  2780.         =====================================================================
  2781.  
  2782.  
  2783.  
  2784.  
  2785.                              Miscellaneous Information
  2786.  
  2787.  
  2788.  
  2789.  
  2790.         =====================================================================
  2791.         
  2792.          
  2793.         
  2794.         Miscellaneous Information
  2795.         =====================================================================
  2796.  
  2797.         Discontinued Routines:
  2798.  
  2799.                 The following routines have been discontinued and are no
  2800.                 longer supported:
  2801.  
  2802.                 DClicBut()
  2803.                 DClicM()
  2804.                 DClicOff()
  2805.                 DClicOn()
  2806.                 DClicRate()
  2807.  
  2808.                 The mouse event handler now handles all the double-click
  2809.                 events. 
  2810.                 
  2811.                 See: InMouseHandler
  2812.         
  2813.                 
  2814.         MLIB and Visual Basic Forms:
  2815.         
  2816.                 MLIB was designed to provide mouse support in a Visual Basic 
  2817.                 form-free environment. Calling any of MLIB's mouse routines 
  2818.                 while forms are showing may conflict with Visual Basic's 
  2819.                 built-in mouse handling procedures and produce unpredictable 
  2820.                 results. It is possible to combine the two handlers if these 
  2821.                 guidelines are followed:
  2822.  
  2823.                 1. Hide ALL Visual Basic forms before accessing ANY of MLIB's 
  2824.                    mouse routines.
  2825.  
  2826.                 2. Once the forms are hidden, initialize MLIB (by calling
  2827.                    InitPointer()), or restore a previously saved instance
  2828.                    of the mouse driver. 
  2829.  
  2830.                 3. When you are ready to give mouse control back to Visual 
  2831.                    Basic (you could save this instance of the mouse for form-
  2832.                    free use), just re-show the forms.
  2833.  
  2834.                 
  2835.                 For Example:
  2836.  
  2837.                 ' Hide the Visual Basic form.
  2838.                 VBForm.HIDE
  2839.  
  2840.         ---------------------------------------------------------------------
  2841.                                                                  Continued...
  2842.                                                                      
  2843.                                                                      
  2844.                                                                      
  2845.                                                                      
  2846.                                                                      
  2847.                                                                      
  2848.                                                                      Page: 41
  2849.         
  2850.         
  2851.                 
  2852.         Miscellaneous Information
  2853.         =====================================================================
  2854.         
  2855.         MLIB and Visual Basic Forms: (continued...)
  2856.                 
  2857.                 ' If we have previously saved our own mouse state then 
  2858.                 ' restore and use this instance, it will be faster than 
  2859.                 ' re-initializing.
  2860.                 IF IsSaved% THEN
  2861.                    CALL RestoreStateM(MyMouseState$, RestoreErr%)
  2862.                 ELSE
  2863.                    CALL InitPointer(X%)
  2864.                 END IF
  2865.                 
  2866.                 CALL ShowPointer
  2867.  
  2868.                 ' MLIB is now ready to be used.
  2869.                 '.
  2870.                 '.
  2871.                 '.
  2872.                 
  2873.                 ' Reverse cycle; hide the pointer and save this instance
  2874.                 ' of the mouse for later use, then give control back to
  2875.                 ' Visual Basic.
  2876.                 
  2877.                 CALL HidePointer
  2878.  
  2879.                 ' Create a buffer and save the mouse state.
  2880.                 MyMouseState$ = SPACE$(GetSizeM%)
  2881.                 CALL SaveStateM(MyMouseState$, SaveErr%)
  2882.  
  2883.                 ' Show that we saved the mouse state.
  2884.                 IF NOT SaveErr% THEN
  2885.                    IsSaved% = -1
  2886.                 END IF
  2887.  
  2888.                 ' Show the VB form.
  2889.                 VBForm.SHOW
  2890.  
  2891.                 See: GetSizeM, SaveStateM, RestoreStateM
  2892.         
  2893.         
  2894.         MLIB Versus the Basic Editor:
  2895.  
  2896.                 Basic refers to QuickBASIC or Visual Basic.
  2897.  
  2898.                 When developing a program in the Basic editing environment, 
  2899.                 the editor and MLIB must of course share the same mouse 
  2900.                 
  2901.         ---------------------------------------------------------------------
  2902.                                                                  Continued...
  2903.  
  2904.                                                                      
  2905.                                                                      
  2906.                                                                      Page: 42
  2907.         
  2908.           
  2909.                 
  2910.         Miscellaneous Information
  2911.         =====================================================================
  2912.         
  2913.         MLIB Verses the Basic Editor: (continued...)
  2914.  
  2915.                 driver which under certain conditions can lead to temporary 
  2916.                 mouse failure. This "problem" is more likely to occur when 
  2917.                 debugging; when your executing code stops due to breakpoints 
  2918.                 (or errors) etc., leaving MLIB's mouse handler still active. 
  2919.                 When this happens the editor's mouse may not respond and 
  2920.                 under certain circumstances the pointer may disappear 
  2921.                 altogether. For the editor to regain control of the mouse,
  2922.                 MLIB must release its control of the mouse driver. This can 
  2923.                 be done by typing "END" in the Immediate window and pressing 
  2924.                 Enter or if possible, continue executing your program to 
  2925.                 normal termination. MLIB will always remove its link with the
  2926.                 mouse driver when your program ends (even if a critical
  2927.                 error terminates your program). Once compiled, and outside 
  2928.                 the Basic environment, our handler is on it's own, and this 
  2929.                 will no longer pose a problem.
  2930.  
  2931.                 NOTE: This condition only occurs when using MLIB's internal
  2932.                 event-driven mouse handler (InMouseHandler()).
  2933.         
  2934.         
  2935.         How To Contact the Author:
  2936.  
  2937.                 If you wish to contact me for any reason at all, here is my
  2938.                 phone number and mailing address:
  2939.                 
  2940.                 Phone: 1-306-379-4505
  2941.         
  2942.                 TERRY VENN
  2943.                 BOX 3A-10,
  2944.                 D'ARCY, SK.,
  2945.                 S0L 0N0, CANADA.
  2946.                 
  2947.                 If you reach my answering machine, leave your name and number 
  2948.                 and I will return your call as soon as possible.
  2949.                 
  2950.                 Just so there are no surprises; I run this business out of my 
  2951.                 own home. Don't be shocked if one of my inquisitive sons beat
  2952.                 me to the phone and chatter inanely. 
  2953.         
  2954.         ---------------------------------------------------------------------
  2955.                                                                  Continued...
  2956.  
  2957.  
  2958.                                                                      
  2959.                                                                      
  2960.                                                                      
  2961.                                                                      
  2962.                                                                      
  2963.                                                                      
  2964.                                                                      Page: 43
  2965.         
  2966.         
  2967.                 
  2968.         Miscellaneous Information
  2969.         =====================================================================
  2970.         
  2971.         Registration Fee:
  2972.         
  2973.                 The registration fee is $25.00 US/CDN, plus $2.50 for 
  2974.                 shipping and handling (US, or CDN funds only). Payment must 
  2975.                 be made in the form of a money order or check. Checks must be 
  2976.                 drawn on a US or CDN bank. There may be a delay in processing 
  2977.                 orders for non-certified check clearance. All orders are 
  2978.                 shipped by air mail. Foreign orders are welcome. 
  2979.  
  2980.                 NOTE: The fee for upgrading from a previous version of MLIB
  2981.                 is $12.50 plus $2.50 for shipping and handling.
  2982.         
  2983.         How To Register:
  2984.  
  2985.                 To register with the author and receive a copy of the latest 
  2986.                 release of this software, fill out the order form (ORDER.FRM)
  2987.                 and send it along with the registration fee to the address 
  2988.                 below:
  2989.         
  2990.                 TERRY VENN
  2991.                 BOX 3A-10,
  2992.                 D'ARCY, SK.,
  2993.                 S0L 0N0, CANADA.
  2994.         
  2995.                 To send a copy of the order form to your printer:
  2996.  
  2997.                 1. Place the MLIB diskette into drive A.
  2998.                 2. Log onto drive A by typing: A: <Press Enter>
  2999.                 3. To begin printing type: COPY ORDER.FRM PRN <Press Enter>
  3000.         
  3001.                 IMPORTANT: Please print clearly when filling out the order
  3002.                 form. Prefered method is to fill out the ORDER.FRM file using
  3003.                 a text editor.
  3004.                 
  3005.         Registered Users Will Receive:
  3006.  
  3007.                 1. The latest release of MLIB.
  3008.                 2. A license or the right to distribute .EXE's that contain
  3009.                    MLIB routines.
  3010.                 3. Free phone/mail support.
  3011.                 4. ME.EXE, a mouse pointer shape editing tool.
  3012.                 5. CVTASM.EXE, a command line utility that converts raw
  3013.                    pointer shape data into assembly code, which can be
  3014.                    assembled and added to your library.
  3015.                 6. ASC2SHP.BAS, a shape editing tool written in BASIC.
  3016.                 7. SHP2ASC.BAS, coverts raw pointer shape data into ASCII
  3017.                    text which can then be edited by ASC2SHP.BAS.
  3018.  
  3019.         ---------------------------------------------------------------------
  3020.  
  3021.  
  3022.                                                                      Page: 44
  3023.