DAY 038: _MOUSEWHEEL - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: Official Links (https://qb64phoenix.com/forum/forumdisplay.php?fid=16) +--- Forum: Learning Resources and Archives (https://qb64phoenix.com/forum/forumdisplay.php?fid=13) +---- Forum: Keyword of the Day! (https://qb64phoenix.com/forum/forumdisplay.php?fid=49) +---- Thread: DAY 038: _MOUSEWHEEL (/showthread.php?tid=1302) |
DAY 038: _MOUSEWHEEL - Pete - 12-18-2022 Pretty simple... SYNTAX scrollAmount% = _MOUSEWHEEL Usage: Track the scrolling increments of the mouse wheel. Example: Code: (Select All) DIM x AS INTEGER One thing to keep in mind is unlike most of the other _MOUSE... keywords, _MOUSEWHEEL has to be placed between WHILE _MOUSEINPUT and WEND statements to be read, not after it like the _MOUSEBUTTON statements. Note: _MOUSEMOVEX and _MOUSEMOVEY is another example of _MOUSE keywords which need to b placed between, not after, the WHILE/WEND _MOUSEINPUT loop. Now if you only want to know the direction of the mouse wheel, use SGN() as in... Code: (Select All) DIM AS INTEGER x, sgnx Pete |