qbasicking
Programmer
I am using this code to run the mousedriver for my GUI:
DECLARE SUB Mousestatus (lb%,rb%,xmouse%,ymouse%)
DECLARE SUB Mousehide ()
DECLARE SUB Mousedriver (ax%,bx%,cx%,dx%)
DECLARE SUB Mouseshow ()
DIM SHARED mouse$
Mouse$ = SPACE$(57)
FOR n% = 1 to 57
READ a$
h$ = CHR$(VAL("&H"+a$))
MID$(Mouse$, n%, 1) = h$
NEXT
DATA 55,89,E5,8B,5E,0C,8B,07,50,8B,5E,0A,8B,07,50,8B
DATA 5E,08,8B,0F,8B,5E,06,8B,17,5B,58,1E,07,CD,33,53
DATA 8B,5E,0C,89,07,58,8B,5E,0A,89,07,8B,5E,08,89.0F
DATA 8B,5E,06,89,17,5D,CA,08,00
SCREEN 12
Mousedriver 4,0,320,240
Mouseshow
WHILE x$ = INKEY$
Mousestatus lb%,rb%,x%,y%
LOCATE 1,1
PRINT lb%,rb%,x%,y%
x$ = INKEY$
WEND
SUB Mousedriver (ax%,bx%,cx%,dx%)
DEF SEG = VARSEG(Mouse$)
Mouse$ = SADD(Mouse$)
CALL Absolute(ax%,bx%,cx%,dx%,Mouse%)
END SUB
SUB Mousehide
Mousedriver 2,0,0,0
END SUB
SUB Mouseshow
Mousedriver 1,0,0,0
END SUB
SUB Mousestatus (lb%,rb%,xmouse%,ymouse%)
Mousedriver 3,bx%,cx%,dx%
lb% = ((bx% AND 1)<>0)
rb% = ((bx% AND 2)<>0)
xmouse% = cx%
ymouse% = dx%
END SUB
Does anybody know who to modify this to use the scrollwheel or the centre button?
DECLARE SUB Mousestatus (lb%,rb%,xmouse%,ymouse%)
DECLARE SUB Mousehide ()
DECLARE SUB Mousedriver (ax%,bx%,cx%,dx%)
DECLARE SUB Mouseshow ()
DIM SHARED mouse$
Mouse$ = SPACE$(57)
FOR n% = 1 to 57
READ a$
h$ = CHR$(VAL("&H"+a$))
MID$(Mouse$, n%, 1) = h$
NEXT
DATA 55,89,E5,8B,5E,0C,8B,07,50,8B,5E,0A,8B,07,50,8B
DATA 5E,08,8B,0F,8B,5E,06,8B,17,5B,58,1E,07,CD,33,53
DATA 8B,5E,0C,89,07,58,8B,5E,0A,89,07,8B,5E,08,89.0F
DATA 8B,5E,06,89,17,5D,CA,08,00
SCREEN 12
Mousedriver 4,0,320,240
Mouseshow
WHILE x$ = INKEY$
Mousestatus lb%,rb%,x%,y%
LOCATE 1,1
PRINT lb%,rb%,x%,y%
x$ = INKEY$
WEND
SUB Mousedriver (ax%,bx%,cx%,dx%)
DEF SEG = VARSEG(Mouse$)
Mouse$ = SADD(Mouse$)
CALL Absolute(ax%,bx%,cx%,dx%,Mouse%)
END SUB
SUB Mousehide
Mousedriver 2,0,0,0
END SUB
SUB Mouseshow
Mousedriver 1,0,0,0
END SUB
SUB Mousestatus (lb%,rb%,xmouse%,ymouse%)
Mousedriver 3,bx%,cx%,dx%
lb% = ((bx% AND 1)<>0)
rb% = ((bx% AND 2)<>0)
xmouse% = cx%
ymouse% = dx%
END SUB
Does anybody know who to modify this to use the scrollwheel or the centre button?