' Mouse Example

IF mouseexist = false THEN
  PRINT "Mouse not found !"
  PRINT "Ending program..."
  END
END IF

a = 0
lx = -1
ly = -1
ll = -1
lr = -1

CLS
PRINT "MOUSE Example Program"
MOUSESHOW     ' Shows the mouse

do while inkey$ = ""

IF not mousel = ll OR NOT mousey = ly OR NOT lr = mouser OR NOT mousex = lx THEN
  locate 2,1
  print "Mouse Left:      "
  print "Mouse Right:     "
  print "Mouse X:         "
  print "Mouse Y:         "

  locate 2,1
  print "Mouse Left:  " + str$(mousel)
  print "Mouse Right: " + str$(mouser)
  print "Mouse X:     " + str$(mousex)
  print "Mouse Y:     " + str$(mousey)
  ll = mousel
  ly = mousey
  lx = mousex
  lr = mouser
END IF

loop

MOUSEHIDE ' Hide the mouse
END


