_MOUSEHIDDEN

From QB64 Phoenix Edition Wiki
Revision as of 13:07, 2 October 2024 by RhoSigma (talk | contribs) (Created page with "{{DISPLAYTITLE: _MOUSEHIDDEN}} The '''_MOUSEHIDDEN''' function returns a boolean value according to the current mouse cursor state (hidden or visible). {{PageSyntax}} : {{Parameter|result%}} = _MOUSEHIDDEN {{PageParameters}} * {{Parameter|result%}} a boolean value reflecting the current mouse cursor state: ** is true (-1), if the mouse cursor is currently hidden ** is false (0), if the mouse cursor is currently visible {{PageDescription}} * This function is esp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The _MOUSEHIDDEN function returns a boolean value according to the current mouse cursor state (hidden or visible).


Syntax

result% = _MOUSEHIDDEN


Parameters

  • result% a boolean value reflecting the current mouse cursor state:
    • is true (-1), if the mouse cursor is currently hidden
    • is false (0), if the mouse cursor is currently visible


Description

  • This function is especially useful for library code, which needs to determine the current state of the mouse cursor, which can be changed using the _MOUSEHIDE and _MOUSESHOW statements.
  • At program start the mouse cursor is visible (default), hence this function would return false (0) until the state is changed.


Availability


Examples

Example 1
Showing the different results of this function.
PRINT "Move the mouse over the program window too see the changes.": PRINT

'at program start the mouse cursor is visible
IF _MOUSEHIDDEN THEN PRINT "Mouse cursor hidden" ELSE PRINT "Mouse cursor visible"
PRINT "press any key...": SLEEP: PRINT

'now hide the mouse cursor
_MOUSEHIDE
IF _MOUSEHIDDEN THEN PRINT "Mouse cursor hidden" ELSE PRINT "Mouse cursor visible"
PRINT "press any key...": SLEEP: PRINT

'and now show it again
_MOUSESHOW
IF _MOUSEHIDDEN THEN PRINT "Mouse cursor hidden" ELSE PRINT "Mouse cursor visible"
PRINT "press any key..."

END
Example by RhoSigma


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link