SETCURSOR Mnemonic - Select Mouse Cursor Shape (Special Window)

Syntax

'SETCURSOR'(curid)

'SETCURSOR'(path$)

Description

The 'SETCURSOR' mnemonic sets the shape of the mouse cursor. In Visual PRO/5 2.x it can define a mouse cursor via a Windows-specific, system-defined cursor ID or a cursor (.cur) or animated cursor (.ani) format file. For animated files, it calls the Windows SetCursor()and LoadCursorFromFile() APIs. Prefixing and Data Server access cannot be used with cursors that are stored on a disk.

Parameter

Description

curid

Defines the cursor ID.

path

Defines the path to the cursor or animated cursor file.

The curid parameter takes the following values:

Note:

Hover over the rows to preview each cursor style.

Cursor ID Style Window-Specific Name
32512 or 0 Arrow OCR_NORMAL
32513 or 2 Ibeam OCR_IBEAM
32514 or 3 Wait OCR_WAIT
32515 or 1 Crosshair OCR_CROSSHAIR
32516 Up Arrow OCR_UPARROW
32642 Size NWSE OCR_SIZENWSE
32643 Size NESW OCR_SIZENESW
32644 Size WE OCR_SIZEWE
32645 Size NS OCR_SIZENS
32646 Size All OCR_SIZEALL
32648 No OCR_NO
32649 Hand OCR_HAND
32650 App Starting OCR_APPSTARTING
32651 What's This? OCR_WHATSTHIS

Example

0010 OPEN (1)"X0"
0020 LET CURSOR$="C:\WINDOWS\Cursors\hourgla2.ani"
0030 LET CURSOR$="C:\WINDOWS\Cursors\hourgla3.ani"
0040 LET CURSOR$="C:\WINDOWS\Cursors\hourglas.ani"
0050 LET TITLE$=CVS(SYS,3)+" "+CVS(REV,3)+" "+CURSOR$
0060 PRINT (1)'WINDOW'(200,200,500,200,TITLE$,$00010003$)
0070 PRINT (1)'SETCURSOR'(CURSOR$),'FOCUS'(0)
0080 DIM EVENT$:TMPL(1)
0090 REPEAT
0100 READ RECORD(1,SIZ=10)EVENT$
0110 UNTIL EVENT.CODE$="X"
0120 RELEASE

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing