mouse move question

G

Guest

I have it so the mouse move makes a label do what I want but my question
centers around the mouse pointer. When it goes over the label I would like
to have the arrow change to the finger style. Much like what it does in the
news group listing here. Is this able to be done? If so, how? Thanks in
advance to those who respond.
*** John
 
D

Dirk Goldgar

JohnE said:
I have it so the mouse move makes a label do what I want but my
question centers around the mouse pointer. When it goes over the
label I would like to have the arrow change to the finger style.
Much like what it does in the news group listing here. Is this able
to be done? If so, how? Thanks in advance to those who respond.
*** John

You can use the code at

http://www.mvps.org/access/api/api0044.htm
API: Displaying a custom Mouse icon

After pasting that code into a standard module, you can put this
statement in the MouseMove event of your label:

MouseCursor IDC_HAND
 
G

Guest

Dirk, I think I might have missed something. I pasted the code in which is
easy enough and pasted the statement into the mouse move. But I am being
told it doesn't exist.
*** John
 
D

Dirk Goldgar

JohnE said:
Dirk, I think I might have missed something. I pasted the code in
which is easy enough and pasted the statement into the mouse move.
But I am being told it doesn't exist.

Did you paste the code into a standard module, not a form, report, or
class module? Make sure you saved that module with a name that is
different from any of the procedures in the module. I named the module
"basMouseCursor", but you can call it almost anything you want, so long
as the name doesn't clash with another public name.

You didn't just paste the line of code into the label's "OnMouseMove"
event property, did you? That property should be set to "[Event
Procedure]", and the event procedure itself should look something like
this:

'----- start of example event procedure -----
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)

MouseCursor IDC_HAND

End Sub
'----- end of example event procedure -----

Note: the Sub header above will have been wrapped to two lines by the
newsreader, but it should really all be on one line.
 
G

Guest

Dirk, the last part about the event procedure, etc. is where I goofed. It is
now straightened out. Thanks for the help on this.
*** John

Dirk Goldgar said:
JohnE said:
Dirk, I think I might have missed something. I pasted the code in
which is easy enough and pasted the statement into the mouse move.
But I am being told it doesn't exist.

Did you paste the code into a standard module, not a form, report, or
class module? Make sure you saved that module with a name that is
different from any of the procedures in the module. I named the module
"basMouseCursor", but you can call it almost anything you want, so long
as the name doesn't clash with another public name.

You didn't just paste the line of code into the label's "OnMouseMove"
event property, did you? That property should be set to "[Event
Procedure]", and the event procedure itself should look something like
this:

'----- start of example event procedure -----
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)

MouseCursor IDC_HAND

End Sub
'----- end of example event procedure -----

Note: the Sub header above will have been wrapped to two lines by the
newsreader, but it should really all be on one line.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
G

Guest

Dirk! You the man baby!

Dirk Goldgar said:
JohnE said:
Dirk, I think I might have missed something. I pasted the code in
which is easy enough and pasted the statement into the mouse move.
But I am being told it doesn't exist.

Did you paste the code into a standard module, not a form, report, or
class module? Make sure you saved that module with a name that is
different from any of the procedures in the module. I named the module
"basMouseCursor", but you can call it almost anything you want, so long
as the name doesn't clash with another public name.

You didn't just paste the line of code into the label's "OnMouseMove"
event property, did you? That property should be set to "[Event
Procedure]", and the event procedure itself should look something like
this:

'----- start of example event procedure -----
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)

MouseCursor IDC_HAND

End Sub
'----- end of example event procedure -----

Note: the Sub header above will have been wrapped to two lines by the
newsreader, but it should really all be on one line.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top