General information
Category:
Coding, syntax & commands
I've been using the same approach to change the system I-beam cursor. I'm still having a problem trying to restore the cursor to its original. Normal01.cur will give you the arrow back, but what if the user had an animated or custom cursor ? (See Microsoft Plus!).
It would be nice to have a handle or some reference to the original system cursor before changing it, which I'm sure it's possible, I just didn't find it yet.
>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only