Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the Mouse Cursor Answered
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Changing the Mouse Cursor Answered
Miscellaneous
Thread ID:
00039275
Message ID:
00039275
Views:
81
Someone was asking how to change the mouse cursor to a hourglass and it was suggested that the SETALL command be used to change the cursor properties of everything on the form. The following bit of code I think is a better solution:

** these are the WIN32API functions u need for changing the
** mouse cursor.
declare integer LoadCursorFromFile in win32api as NewCur string declare short SetSystemCursor in win32api integer, integer

*NORMAL 32512 - usually u would put these in a .h file
*IBEAM 32513
*WAIT 32514
*CROSS 32515
*UP 32516
*SIZE 32640
*ICON 32641
*SIZENWSE 32642
*SIZENESW 32643
*SIZEWE 32644
*SIZENS 32645
*SIZEALL 32646
*ICOCUR 32647
*NO 32648 (Win NT only)

* get a handle for a new cursor
nCurHndl=NewCur("c:\vfp\samples\graphics\cursors\down.cur")

* this example changes the noraml (arrow) cursor to the new cursor
* u can use normal01.cur to return to the normal cursor
nChangOK=SetSystemCursor(nCurHndl,32512)

*after u changed one of the "system" cursors to ur own
*u can use the MousePointer property to referance it

Michael G. Emmons
memmons@nc.rr.com
Next
Reply
Map
View

Click here to load this message in the networking platform