|
-
Sep 29th, 2001, 11:23 PM
#1
Thread Starter
Addicted Member
Need help with SetSystemCursor
Hi,
I'm using the following code to change the system cursor...
***************************************
Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function SetSystemCursor Lib "user32" (ByVal hcur As Long, ByVal id As Long) As Long
'Private Declare Function CopyCursor Lib "user32" Alias "CopyIcon" (ByVal hcur As Long) As Long
'Private Declare Function GetCursor Lib "user32" () As Long
Const OCR_APPSTARTING = 32650
'The application starting (arrow and hourglass) cursor.
Const OCR_CROSS = 32515
'The cross-shaped cursor.
Const OCR_IBEAM = 32513
'The text selection (I-beam) cursor.
Const OCR_NO = 32648
'The "no"-symbol (circle with slash through it) cursor.
Const OCR_NORMAL = 32512
'The normal arrow cursor.
Const OCR_SIZEALL = 32646
'The four-arrow resize/move cursor.
Const OCR_SIZENESW = 32643
'The double-arrow resize/move cursor pointing to the upper-right and lower-left.
Const OCR_SIZENS = 32645
'The double-arrow resize/move cursor pointing up and down.
Const OCR_SIZENWSE = 32642
'The double-arrow resize/move cursor pointing to the upper-left and lower-right.
Const OCR_SIZEWE = 32644
'The double-arrow resize/move cursor pointing left and right.
Const OCR_UP = 32516
'The up arrow cursor.
Const OCR_WAIT = 32514
'The waiting (hourglass) cursor.
Const OCR_HELP = 32651
Dim hcursor As Long
Dim retval As Long
Private Sub Command1_Click()
hcursor = LoadCursorFromFile("C:\MyProg\MyNew.cur")
retval = SetSystemCursor(hcursor, OCR_NORMAL)
End Sub
***************************************
This works fine but.....how do you get the change to take effect permanently? When I restart my computer, the default cursor shows up again.
Thanks in advance,
Ron
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|