OD> WF> Has anyone got any source or library for PB to detect
OD> WF> DOS if there is a mouse driver loaded. .
OD> If you use MS-DOS or PC DOS, try typing MSD
od>....
I'll assume that was not much help. :)
Here is some ancient QBasic source.
'******************** Clip here ************************
'***** MOUSE_EX.BAS **********************************
DEF SEG = 0
M.seg& = 256& * PEEK(207) + PEEK(206)
M.info% = 256& * PEEK(205) + PEEK(204) + 2
' see if a Mouse Driver is loaded
DEF SEG = M.seg&
IF (M.seg& OR (M.info% - 2)) AND PEEK(M.info% - 2) = 207 THEN
SCREEN 0
LOCATE 12, 30
PRINT "Mouse Driver Not Found!"
LOCATE 14, 28
PRINT " Load the Mouse and re-try"
END
END IF
'CALL absolute(0, 0, 0, 0, M.info%) 'Set Defaults
'CALL absolute(1, 0, 0, 0, M.info%) 'Turn on Pointer
'CALL absolute(2, 0, 0, 0, M.info%) 'Turn off Pointer
'CALL absolute(3, 0, 0, 0, M.info%) 'Status
'CALL absolute(4, 0, col%, row%, M.info%) 'Locate Pointer
' in text mode Mickey reports 640 x 192
' Divide by 8 to use row and col
CALL absolute(0, 0, 0, 0, M.info%) 'Set Default
COLOR 7, 1
CLS
CALL absolute(1, 0, 0, 0, M.info%)
CALL absolute(4, 0, col% * 8, row% * 8, M.info%)
LOCATE 8, 10
PRINT "Press Left and Right Buttons at the same time to END"
DO
CALL absolute(3, mbut%, xpos%, ypos%, M.info%)
LOCATE 12, 20
PRINT "Row"; (ypos% \ 8) + 1; " "; "Col"; (xpos% \ 8) + 1
' text mode converted to row and col
LOCATE 14, 20: PRINT "You pushed button"; mbut%
' Left Button = 1 Right Button = 2 Both buttons = 3
LOOP UNTIL mbut% >= 3 ' Left and Right Buttons held down
DEF SEG = 0
'********** End Chopping Here ****************
---
> ] By tomorrow, this will all seem like a dream................
---------------
|