INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Screen.Mousepointer = ?

Screen.Mousepointer = ?

(OP)
Hi Folks,

I'm in Access 2000 and I'm trying to get the mouse pointer to change to the hand when it hovers over a label on my form.

I've tried:

Screen.Mousepointer = 1  through 20

None of these offer the "Hand" pointer.

Anyone got any ideas?

birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!

RE: Screen.Mousepointer = ?

Don't know if this will help...

The hand icon is not available as one of the intrinsic constants.

You can set the pointer to any icon you like using.

'Set mouse pointer to custom
Me.MousePointer = 99

'load image to use
Me.MouseIcon = LoadPicture("c:\Program Files\html-helper\Icon studio\icons\arrows\ARW02RT.ICO")

This works in VB6 and should work in ACC2000


There are two ways to write error-free programs; only the third one works.

RE: Screen.Mousepointer = ?

(OP)
That's not doing it! Any other suggestions? :)

birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!

RE: Screen.Mousepointer = ?

Is it giving and error, or just having no effect??

There are two ways to write error-free programs; only the third one works.

RE: Screen.Mousepointer = ?

(OP)
Well the first error was that the file being called in LoadPicture() wasn't on my HDD...I substituted the file you stated with any old icon I found on my HDD. Still I was then getting the error "Method or data member not found" and the cursor highlighted the .MouseIcon

Do you think I need to set up a reference?

birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!

RE: Screen.Mousepointer = ?

I think you may be (as you quite rightly say) missing a reference.
I'm just looking to see what you will need to reference....

There are two ways to write error-free programs; only the third one works.

RE: Screen.Mousepointer = ?

(OP)
I only have four references highlighted:

• Visual Basic For Applications
• Microsoft Access 9.0 Object Library
• OLE Automation
• Microsoft ActiveX Data Objects 2.1 Library

birklea ~©¿©~ <><
Dim objJedi as Jedi.Knight
Set objJedi[skyWalker].Aniken = FatherOf(useThe.Force(objJedi[skyWalker].luke))

RE: Screen.Mousepointer = ?

Found out that the MouseIcon is not available in 2000. This does work though...

'Put this in module
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

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


'for each control you want to have the hand icon for
'put the following in the MouseMove event

Dim hCur As Long

hCur = LoadCursor(0, IDC_HAND)
If (hCur > 0) Then
SetCursor hCur
End If

(fingers crossed!)

There are two ways to write error-free programs; only the third one works.

RE: Screen.Mousepointer = ?

(OP)
Absolutely fantastic!!! Thanks for the hard work! Have a Star!!!!


Tudor

birklea ~©¿©~ <><
Dim objJedi as Jedi.Knight
Set objJedi[skyWalker].Aniken = FatherOf(useThe.Force(objJedi[skyWalker].luke))

RE: Screen.Mousepointer = ?

Cheers, knew we'd get there in the end...

There are two ways to write error-free programs; only the third one works.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close