Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Cursor Shape

Status
Not open for further replies.

mondeoman

MIS
Dec 7, 2006
203
GB
I have just installed Office 2010 with Access 2010. I used to be able to change the cursor to a hand using the OnMouseMove property by using this code:

Call MouseCursor(32649)

This does no longer seem to work. Has anyone got a solution please?
 
What is MouseCursor ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
MouseCursor was a code I used in an earlier version of Access (2002). It worked - this was the full code for that event:

Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Call MouseCursor(32649) 'Display hand cursor
End Sub
 
Call MouseCursor

MouseCursor is a function or a sub somewhere. I've never seen it before, but that doesn't mean it isn't a system function. What would be helpful is to see the code in the funtion MouseCursor, not the code that calls it.

Beir bua agus beannacht!
 
So, again, what is the code of MouseCursor ?

BTW, please, define 'This does no longer seem to work'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
You must have a function similar to the one shown in this thread:
You might be better off to investigate the MousePointer property.
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
Thanks for the input but I have cracked it now.

On the basis of earlier returns I have created a module called ModLoadCursorHand:

Option Compare Database
Option Explicit

' Declarations for setting the cursor icon when called
Public Const IDC_HAND = 32649&
Public Const IDC_ARROW = 32512&
Public Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Public Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long

This module is then called by using:

ModLoadCursorHand.SetCursor LoadCursor(0, IDC_HAND)

In the On Mouse Move event property
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top