D
Dave Ramage
Hello..
I'm attempting to use API functions to change the mouse cursor to a
crosshair when a certain chart is activated. Have pulled some code off
another post, but it does not seem to work. Does anyone have any other
sugestions:
Code sample:
Private Declare Function LoadCursorBynum Lib "user32" Alias _
"LoadCursorA" (ByVal hinstance As Long, ByVal lpCursorName As Long) As Long
Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As
Long
Public Const IDC_CROSS = 32515& ' Crosshair
Public Function MouseCursor(CursorType As Long)
Dim lngRet As Long
lngRet = LoadCursorBynum(0&, CursorType)
lngRet = SetCursor(lngRet)
End Function
Thanks,
Dave
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...df7bbc8&dg=microsoft.public.excel.programming
I'm attempting to use API functions to change the mouse cursor to a
crosshair when a certain chart is activated. Have pulled some code off
another post, but it does not seem to work. Does anyone have any other
sugestions:
Code sample:
Private Declare Function LoadCursorBynum Lib "user32" Alias _
"LoadCursorA" (ByVal hinstance As Long, ByVal lpCursorName As Long) As Long
Private Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As
Long
Public Const IDC_CROSS = 32515& ' Crosshair
Public Function MouseCursor(CursorType As Long)
Dim lngRet As Long
lngRet = LoadCursorBynum(0&, CursorType)
lngRet = SetCursor(lngRet)
End Function
Thanks,
Dave
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...df7bbc8&dg=microsoft.public.excel.programming