Declare Function SetSystemCursor Lib "user32.dll" (ByVal hcur As Long, ByVal id As Long) As Long
Platforms: Win 32s, Win 95/98, Win NT
SetSystemCursor changes one of the cursors that Windows provides. For example, this function can change the cursor used to represent the default arrow cursor. Be careful using this function, since this redefines the default cursors instead of simply setting the current look of the cursor. The function destroys the cursor handle passed to it once it sets the new default cursor. The function returns 1 if successful, or 0 if an error occured.
Example:
' Set Windows's default "hourglass" cursor to the cursor in
' C:\MyProg\NewWait.ani.
Dim hcursor As Long ' receives handle to the cursor from the file
Dim retval As Long ' return value
' Load the desired cursor from the file:
hcursor = LoadCursorFromFile("C:\MyProg\NewWait.ani")
retval = SetSystemCursor(hcursor, OCR_WAIT) ' redefine hourglass cursor
' Now Windows will use NewWait.ani as the hourglass cursor.
See Also: SetCursor
Category: Cursor
Go back to the alphabetical Function listing.
Go back to the Reference section index.
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/s/setsystemcursor.html