how to change mouse with api in Windows 2000
this doesn't work in windows 2000
Code:
Option Explicit
Private Declare Function GetCursor Lib "user32.dll" () As Long
Private Declare Function LoadCursor Lib "user32.dll" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As String) As Long
Private Declare Function SetCursor Lib "user32.dll" (ByVal hCursor As Long) As Long
Public lArrow As Long ' get the handle of the arrow cursor
Public lCursor As Long ' send the handle of the hourglass cursor
Public retval As Long ' return value
Const IDC_WAIT = vbHourglass
Const IDC_ARROW = vbDefault
Private Sub Command1_Click()
' save the handle to the arrow cursor
lArrow = GetCursor()
' send the handle of the hourglass cursor
lCursor = LoadCursor(0, IDC_WAIT)
' set the cursor to hourglass
SetCursor (lCursor)
End Sub
Private Sub Command2_Click()
' change hourglass back to the arrow
SetCursor (lArrow)
End Sub
anyone know why?
yes, i'm aware of these other properties...
but i need to do it only by using the API calls...
this is a special case....
trust me, if i could i would use those other properties.