home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
pb
/
library5
/
mice.bas
< prev
next >
Wrap
BASIC Source File
|
1990-08-18
|
3KB
|
114 lines
$LINK "MICE.OBJ"
DECLARE FUNCTION GetMickeys&()
DECLARE FUNCTION GetMousePage%()
DECLARE FUNCTION IsMouse%()
DECLARE FUNCTION MouseButtons%()
DECLARE FUNCTION MouseInfo&()
DECLARE FUNCTION WhereMouse&()
DECLARE FUNCTION MouseType%()
DECLARE SUB ExcludeMouse(integer,integer,integer,integer)
DECLARE SUB HideMouse()
DECLARE SUB MousePenOff()
DECLARE SUB MousePenOn()
DECLARE SUB MouseSpeed(integer)
DECLARE SUB MouseWindow(integer,integer,integer,integer)
DECLARE SUB MoveMouse(integer,integer)
DECLARE SUB ResetMouse()
DECLARE SUB RestoreMouse()
DECLARE SUB SetMickeys(integer,integer)
DECLARE SUB SaveMouse()
DECLARE SUB SetMouseSensitivity(integer,integer,integer)
DECLARE SUB SetMousePage(integer)
DECLARE SUB ShowMouse()
'-----------------------------------------------------------------------------
' Sample program to demonstrate some of the mouse routines
'-----------------------------------------------------------------------------
cls
a% = IsMouse% ' check to see if mouse is present
select case a%
case = -1
print "You have no mouse!"
stop
case else
print using "Your Mouse has ### buttons.";a%
a& = mouseinfo&
major& = (a& / 65536) / 256
minor& = (a& / 65536) mod 256
type& = (a& mod 65536) / 256
irq& = (a& mod 65536) mod 256
vers = major& + (minor& / 10)
print using "Version ####.## Type #### IRQ ####";_
vers,type&,irq&
print "Mouse Type = ";
mt% = mousetype%
select case mt%
case = 1
print " Bus Mouse"
case = 2
print " Serial Mouse"
case = 3
print " InPort Mouse"
case = 4
print " PS/2 Mouse"
case = 5
print " HP Mouse"
end select
end select
call showmouse ' display the mouse cursor
print
print "Mouse is in page ";getmousepage% ' tell what screen page mouse is in
print
input "Move mouse to what page ";mpg% ' move the mouse to a new page
call setmousepage(mpg%)
print "Mouse is in page ";getmousepage%
screen ,,mpg%,mpg% ' change screen page to mouse page
call showmouse ' display the mouse cursor
while inkey$ = null$ ' give info on where the mouse is
b& = wheremouse&
x& = (b& mod 65536)
y& = (b& / 65536)
locate 10,1
print using "Mouse is at ##### ##### Press any key to exit.";x&,y&
wend
cls
while inkey$ = null$ ' tell user about mouse buttons
b% = mousebuttons%
locate 1,1
print "Mouse Buttons (Press any key to exit): ";
select case b%
case = 0
print "None "
case = 1
print "Left Button "
case = 2
print "Right Button "
case = 4
print "Middle Button "
case = 3
print "Left and Right Buttons "
case = 5
print "Left and Middle Buttons "
case = 6
print "Right and Middle Buttons "
case = 7
print "All Buttons "
end select
wend