QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _LASTWHEEL function returns the number of wheels a specified number INPUT device on your computer has.

Syntax

wheelCount% = _LASTWHEEL(deviceNumber)

Example(s)

Checking for the system’s input devices and number of wheels available.


devices = _DEVICES  'MUST be read in order for other 2 device functions to work!
PRINT "Number of input devices found ="; devices
FOR i = 1 TO devices
  PRINT _DEVICE$(i)
  IF INSTR(_DEVICE$(i), "[WHEEL]") THEN PRINT "Wheels:"; _LASTWHEEL(i)
NEXT 


Number of input devices found = 2
[KEYBOARD][BUTTON]
[MOUSE][BUTTON][AXIS][WHEEL]
Wheels: 3

Note: A mouse may have 3 wheels listed when there is only one scroll wheel.

See Also