Futurebasic/Language/Reference/cursor

CURSOR statementEdit

CURSOREdit

StatementEdit

✔ χ Appearance ✔ χ Standard ✔ χ Console

Syntax (Standard BASIC):
CURSOR [=] intExpr

Syntax (Appearance Runtime)Edit

CURSOR cursorID[,cursorType]

Revised:
February, 2002 (Release 6)

DescriptionEdit

If intExpr is positive, it's interpreted as the resource ID of a 'crsr' (first choice) or a 'CURS' resource (alternative choice), and this statement changes the current cursor to the indicated cursor. The following cursor resources are found in the System file, and are always available:

For Appearance Manager calls, cursorType must be _themeCursorStatic or _themeCursorAnimate

Standard BASIC:

Resource ID

Cursor

_arrowCursor(0)

<img src="c/cursor01.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_iBeamCursor(1) <img src="c/cursor02.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_crossCursor(2) <img src="c/cursor03.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_plusCursor(3) <img src="c/cursor04.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_watchcursor(4) <img src="c/cursor05.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">

Appearance manager Cursors
Items marked with an asterisk (*) may be animated.

Resource ID

Cursor

_kThemeArrowCursor (0)

<img src="c/cursor01.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeCopyArrowCursor (1) <img src="c/cursor01a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeAliasArrowCursor (2) <img src="c/cursor02a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeContextualMenuArrowCursor (3) <img src="c/cursor03a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeIBeamCursor (4) <img src="c/cursor02.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeCrossCursor (5) <img src="c/cursor03.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemePlusCursor (6) <img src="c/cursor04.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeWatchCursor (7)* <img src="c/cursor05.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeClosedHandCursor (8) <img src="c/cursor08a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeOpenHandCursor (9) <img src="c/cursor09a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemePointingHandCursor (10) <img src="c/cursor10a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeCountingUpHandCursor (11)* <img src="c/cursor11a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeCountingDownHandCursor (12)* <img src="c/cursor09a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeCountingUpAndDownHandCursor (13)* <img src="c/cursor11a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeSpinningCursor (14)* <img src="c/cursor14a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeResizeLeftCursor(15) <img src="c/cursor15a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeResizeRightCursor(16) <img src="c/cursor16a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">
_kThemeResizeLeftRightCursor(17) <img src="c/cursor17a.gif" alt="IMAGE imgs/CURSOR_statement02.gif" height="16" width="16">

Error Messages (Appearance Manager)
If you attempt to use an illegal value in the cursor statement, you will see the following dialog:

<img src="c/CURSOR_statement07.gif" alt="" height="132" width="375" border="0">

This type of dialog will only appear when you select Run from the Command menu. It will not show up if you use an illegal value in the program after selecting Build. This prevents the error message from appearing on your end user's screen, but still makes it available during the coding process.

Forcing a Cursor Event:
If intExpr is negative(for example:CURSOR=-_watchCursor), then the cursor is changed to the one whose ID is ABS(intExpr), and a cursor event is generated, which can be trapped by checking for events of type _cursEvent with the DIALOG function. You cannot generate a _cursEvent when switching to the _arrowCursor (since its resource ID number has no negative!)

Note:
If you've designed a csrs or a CURS resource of your own which you want to make available to your program, do the following:

  1. Assign a positive resource ID number to the resource (don't use any of the numbers in the above table. You should use an ID number of 128 or higher.)
  2. Copy the resource to the resources file which you reference in your program's RESOURCES statement.

You can then use the CURSOR statement to activate your cursor within the program.

See AlsoEdit

DIALOG
DEF CYCLE