LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default SetCursor API problems...

....just bumping this up a bit!

I want to be able to force the mouse pointer to a cross hair icon so that
users can pick off values from a graph easily. Unfortunatley the
Application.Cursor property does not have this flexibility.

This SetCursor API function should work in theory, but seems to be overuled
by the Excel app?

Thanks again,
Dave

"Dave Ramage" wrote:

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/comm...el.programming

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
VBA Problems Elise148 Excel Discussion (Misc queries) 7 July 4th 07 08:41 PM
More problems John21[_7_] Excel Programming 1 August 10th 06 08:22 PM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM
Dir problems Jim[_24_] Excel Programming 2 October 6th 03 10:22 PM


All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"