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

Can I change the cursor if I mouse over an image or button in Access2K

Status
Not open for further replies.

jimtmelb1

Technical User
Sep 7, 2003
72
AU
Hi,

I have used buttons as images in my Access 2000 database. Is it possible to mouse over an image or even a button and be able to change the mouse cursor.

Also,

When you use a text field that's bound to a field in the database you can set to hyperlink and when you mouse over it you get the hand cursor like you get when viewing on the Internet.
If the text field is not bound to any data and is populated by some other way you don't see the hand cursor. Is there any way around this.

Thanks for your help
Jim
 
You can use this:
Code:
Option Compare Database
Public Const HandCursor = 32649&
Public Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long
Public Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long

Function fMouseHand(strControl)
    [green]'Change the mousepointer to a hand[/green]
    Dim lHandle As Long
    lHandle = LoadCursor(0, HandCursor)
    If (lHandle > 0) Then SetCursor lHandle
End Function

Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Call fMouseHand("Command2")
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top