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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MousePointer - Hand

Status
Not open for further replies.

TR6

Technical User
Apr 7, 2003
15
0
0
US
In Access 2000, how do I get the mouse pointer to change to the "Hand"? The Help section only gives settings of: 0, 1, 3, 7, 9, and 11. Help also says that setting to an integer other than these will cause the property to be set to 0.

Also, when using the MouseMove event, how do you keep the affected control from "flickering" as you move the mouse around?

Thanks,
Bill
 
FancyPrairie,

I must have overlooked something. I get a compile error that
LoadCursor(0,IDC_HAND) is an undefined function. ??
 
I believe you left out some code.

I generally create a module (i.e. basPublicDeclarations), in which I declare all of my public (global) variables. If you don't want to include the following 3 declarations in "basPublicDeclarations", then you need to include them in the module that contains the function ChangeMouseToHand and set them as Private rather than Public.


Public Const IDC_HAND = 32649

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


Function ChangeMouseToHand()

Dim hCur As Long

hCur = LoadCursor(0, IDC_HAND)

If (hCur > 0) Then
SetCursor hCur
End If


End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top