Maybe you can try this:
Basically this code will allow you to change the mouse pointer as you like
but you must have a cursor file to use e.g.: MyHandCursor.CUR .I'm sure
there's a lot on the web to download.

1. Save your cursor file (*.CUR) on the same directory of your application
2. Create a new module and paste the below code:
3. Look for this line on the code and change the cursor file name
accordingly:
Const curNAME = "MyHandCursor.CUR"
4. Type this under On Mouse Move event of your label:
        Call GetCursor
5. Then type or do whatever you want under Click event of your label

HTH,
George


'========== Code Start ===========
Option Compare Database
Option Explicit

Public Const IDC_APPSTARTING = 32650&
Public Const IDC_ARROW = 32512&
Public Const IDC_CROSS = 32515&
Public Const IDC_IBEAM = 32513&
Public Const IDC_ICON = 32641&
Public Const IDC_NO = 32648&
Public Const IDC_SIZE = 32640&
Public Const IDC_SIZEALL = 32646&
Public Const IDC_SIZENESW = 32643&
Public Const IDC_SIZENS = 32645&
Public Const IDC_SIZENWSE = 32642&
Public Const IDC_SIZEWE = 32644&
Public Const IDC_UPARROW = 32516&
Public Const IDC_WAIT = 32514&

Declare Function LoadCursorBynum Lib "user32" Alias "LoadCursorA" _
  (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long

Declare Function LoadCursorFromFile Lib "user32" Alias _
  "LoadCursorFromFileA" (ByVal lpFileName As String) As Long

Declare Function SetCursor Lib "user32" _
  (ByVal hCursor As Long) As Long

Const curNAME = "Hand.CUR"
Private mhCursor As Long
Private mstrCursorPath As String
Private Const ERR_INVALID_CURSOR = vbObjectError + 3333

Function MouseCursor(CursorType As Long)
  Dim lngRet As Long
  lngRet = LoadCursorBynum(0&, CursorType)
  lngRet = SetCursor(lngRet)
End Function

Function PointM(strPathToCursor As String)
    If mhCursor = 0 Then
        mhCursor = LoadCursorFromFile(strPathToCursor)
    End If
    Call SetCursor(mhCursor)
End Function

Public Sub GetCursor()
On Error GoTo ErrHandler
    If Len(mstrCursorPath) = 0 Then
        mstrCursorPath = CurrentDb.Name
        mstrCursorPath = Left(mstrCursorPath, InStr(mstrCursorPath,
Dir(mstrCursorPath)) - 1)
        mstrCursorPath = mstrCursorPath & curNAME
        If Len(Dir(mstrCursorPath)) = 0 Then
            mstrCursorPath = vbNullString
        End If
    End If
    If Len(mstrCursorPath) = 0 Then
        Err.Raise ERR_INVALID_CURSOR
    Else
        PointM (mstrCursorPath)
    End If
ExitHere:
    Exit Sub
ErrHandler:
    With Err
        If .Number = ERR_INVALID_CURSOR Then
            MsgBox "Error: " & .Number & vbCrLf & _
                "Invalid Cursor type", _
                vbCritical Or vbOKOnly, _
                "Cursor Function"
        Else
            MsgBox "Error: " & .Number & vbCrLf & _
                .Description, _
                vbCritical Or vbOKOnly, _
                "Cursor Function"
        End If
    End With
    Resume ExitHere
End Sub

'========== End of Code ===========




-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] Behalf Of jmw95823
Sent: Saturday, June 25, 2005 1:15 AM
To: [email protected]
Subject: [AccessDevelopers] Re: MouseOver Event for a Label


I don't think I can link to code in the Click event with a hyperlink.
--- In [email protected], "George Oro" <[EMAIL PROTECTED]>
wrote:
> Not sure if this is what you are looking for...
>
> Type any hyperlink on the Hyperlink Address property of the label
>
>
>
> George
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of jmw95823
> Sent: Tuesday, June 21, 2005 9:59 PM
> To: [email protected]
> Subject: [AccessDevelopers] Re: MouseOver Event for a Label
>
>
> I didn't find a mouse over event.  Will use button(s) instead.
> --- In [email protected], "jmw95823" <[EMAIL PROTECTED]>
> wrote:
> > Can you do a mouse over event for a label?  I want to use an
> > underlined label to simulate a hyperlink.  When the mouse is
over
> the
> > label, I want to change the cursor to a hand.  Thanks for any
help.
> > Jim
>
>
>
>
>
> Please zip all files prior to uploading to Files section.
> Yahoo! Groups Links






Please zip all files prior to uploading to Files section.
Yahoo! Groups Links










Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to