How can my cursor get an "hand" shape ? (1 Viewer)

A

alberto p

Guest
Can anyone tell me how to change the default cursor's shape in an hand shape ?
My goal is to give my forms a 'web' look.
(Access 97).
 

KevinM

Registered User.
Local time
Today, 00:31
Joined
Jun 15, 2000
Messages
719
You can only do this with hyperlinks.
 
A

alberto p

Guest
KEVINM,

Thanks for your reply about my topic about how to have a cursor with hand shape.

I found a solution in an Italian forum that I try to translate (I haven't tried it yet):

-Use a textbox of the Miscrosoft Forms 2.0 (FM20.dll) as it has the properties mousepointer and
mouseicon.
-On Mousemove event put 99 so you can use any cursor.
-test the mousepointer value to not load continuously the cursor:

private sub textbox_MouseMove
if testbox.mousepointe <> 99
textbox.mousepointer = 99
textbox.mouseicon = loadpicture("path and name of CURSOR") -file with extension .cur-
endif
end sub

Last thing: This method is not valid for animated cursor.

What you think about this ?


Alberto P
 

Cosmos75

Registered User.
Local time
Yesterday, 18:31
Joined
Apr 22, 2002
Messages
1,281
Sounds like a good idea to try!

Am gonna try this out in Access 2000!! Anyone know if there is a way for Access 2000, will post back once I find time to try this out!
 

chrismcbride

Registered User.
Local time
Today, 00:31
Joined
Sep 7, 2000
Messages
301
FYI

I found this at the UtterAccess Web site - It was submitted by Candace Tripp.

Public Function SetMousePointer(intPointer As Integer) As Boolean
' Comments : sets the mouse pointer
' Parameters: intPointer - 0 (Default) The shape is determined by Microsoft Access
' 1 Normal Select (Arrow)
' 3 Text Select (I-Beam)
' 7 Vertical Resize (Size N, S)
' 9 Horizontal Resize (Size E, W)
' 11 Busy (Hourglass)
' Returns : True if successful, False otherwise


On Error GoTo err_SetMousePointer

Application.Screen.MousePointer = intPointer

SetMousePointer = True

exit_SetMousePointer:
Exit Function

err_SetMousePointer:
SetMousePointer = False
Resume exit_SetMousePointer

End Function

HTH
Chris
 

ghudson

Registered User.
Local time
Yesterday, 19:31
Joined
Jun 8, 2002
Messages
6,195
Try this...

Wow, that's a lot of work just to make the cursor change from an arrow to a finger pointing hand.

I simply type a single space in the command buttons Hyperlink Address property field.

Your cursor will then change to the "hand" when hovering over the button and will work just like a normal mouse pointer.

Simple but effective! :D

HTH
 
R

Rich

Guest
Whilst the space cheat can be effective, you should be aware of some of the side effects. Try adding a custom minimise button and then add the spacebar trick, try it and see.
Oh, I do apologise that might be have to be minimze:)
 

Quaeldorn

New member
Local time
Yesterday, 16:31
Joined
Jan 17, 2014
Messages
8
Re: How can my cursor get an "hand" shape ?

I appreciate this is an old post, and is marked as Solved, but it was ranked quite high on the search engine results when I wanted to find it and thought I'd append it.

It look like MS have added this feature, but it only works for a TextBox.
Change property 'Display As Hyperlink' to Always.

If you're trying to do this on a Label...

  • Right-click > Change to > Textbox
  • Leave the Control Source blank (unbound)
  • Change the Default Value to the same as the Caption when it was a label
  • There is no real need to change its name, but you should re-set the Events. VBA code will still exists for a control of that name, but you just have to redirect it.
  • Change property 'Display As Hyperlink' to Always.
You now have an 'internal' link to your other forms and reports that has the typical hand icon we're all so familiar with.



I never tested the direct approach for changing cursor via VBA on the MouseMove event because I assumed that when you move the mouse away, the cursor would stay the same, therefore you need additional mousemove events on all nearby objects/the form itself, to return the cursor back to default.
 

George Hewitt

Registered User.
Local time
Today, 00:31
Joined
Nov 11, 2013
Messages
23
Re: How can my cursor get an "hand" shape ?

only 12 years lol :eek:
 

Users who are viewing this thread

Top Bottom