Creates a MouseCursor object based on data contained in a file. The file is specified by its name and containing cursor data in either cursor (.CUR) or animated cursor (.ANI) format.
Set mc = LoadCursor(file$)
mc:MouseCursor object
file$sexp
LoadCursor loads a cursor file either from disk or from the ':Files' section. The return value is a MouseCursor object that can be assigned to MouseCursor properties of Ocx objects (for instance Form.MouseCursor). The MouseCursor object is activated when the MousePointer property of the Ocx object is set to basCursor (98).
OpenW 1
Local mc As MouseCursor
If Exist(WinDir & "\Cursors\hourglas.ani") // Only included up to WinXP
Set mc = LoadCursor(WinDir & "\Cursors\hourglas.Ani")
Else
Set mc = LoadCursor(WinDir & "\Cursors\aero_busy.ani")
EndIf
Set Win_1.MouseCursor = mc
Win_1.MousePointer = 98 // basCursor
Do
Sleep
Until IsNothing(Me)
Set mc = Nothing
Since GFA-BASIC 32 uses the LoadCursor as a reserved name, the API function LoadCursor() has been renamed to LoadResCursor or apiLoadCursor.
{Created by Sjouke Hamstra; Last updated: 12/10/2014 by James Gaite}