MOUSEHIDDEN: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(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...")
 
No edit summary
 
Line 28: Line 28:
File:Osx.png|'''yes'''
File:Osx.png|'''yes'''
</gallery>
</gallery>
<!-- Additional availability notes go below the gallery -->
<!-- Additional availability notes go below here -->





Latest revision as of 12:12, 8 December 2024

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