Light Pen Won't Work with Mouse InstalledLast reviewed: September 16, 1996Article ID: Q10619 |
The information in this article applies to:
SUMMARYIf you have both a mouse and a light pen installed, you may get conflicts between the two. This is because the Microsoft Mouse can be used to emulate a light pen. When installed, the mouse driver is initialized with "light pen emulation mode" turned on. Pressing both mouse buttons simultaneously indicates pen touching the screen; releasing the buttons indicates pen off the screen. If a light pen is installed with the mouse driver in the above condition, the light pen cannot function correctly. Light pen information is collected using an INT 10h DOS call, code 4. With the mouse's pen emulation mode turned on, the pen does not appear to work properly because the mouse driver is pointing that interrupt's vector to its own routine instead of to the regular light pen handler. For the pen to work properly with the mouse driver installed, mouse function 14 must be called to turn pen emulation mode off. Once disabled, emulation mode is reenabled by calling mouse function 13. See the Microsoft Mouse Programmer's Reference for documentation of the mouse function calls.
MORE INFORMATIONThe following is a short BASIC program you can run to disable or enable the mouse's light pen emulation mode: 10 INPUT "(1) Disable or (2) Enable light pen emulation";P% 20 IF P% <> 1 AND P% <> 2 THEN PRINT "WRONG RESPONSE, TRY AGAIN":GOTO 1025 DEF SEG =0 30 MSEG = 256 * PEEK(51*4+3) + PEEK(51*4+2) 40 MOUSE = 256 * PEEK(51*4+1) + PEEK(51*4)+2 50 IF MSEG AND MOUSE THEN 70 60 PRINT "MOUSE DRIVER NOT FOUND":END 70 DEF SEG = MSEG 80 IF P% = 1 THEN M1% = 14 ELSE M1% = 13 90 CALL MOUSE(M1%,M2%,M3%,M4%) 100 DEF SEG 'restore segment to BASIC's data segmentLine 90 contains Mx% because the mouse function calls are expecting four parameters to be passed, even if no value is assigned to one or more of them.
|
KBCategory: kbhw
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |