• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

mouseover

I want to show text in a label.caption whenever the mouse is over a command button on a form.  Is this possible?
0
Daron1
Asked:
Daron1
  • 4
  • 2
1 Solution
 
Gotcha007Commented:
you can use the MouseMove fonction for the command button (Switch to the code windows ,Choose in object listbox your command button and in the function listbox choose mousemove)

when the mouse is on the button this fonction is activated.
and in this fonction you can write a text to your label.
0
 
Daron1Author Commented:
Private Sub command1_MouseMove()
Label4.Caption = "label text."
End Sub

I tried this but get a compile error:

"Procedure declaration does not match description of event or procedure having the same name."
0
 
Daron1Author Commented:
Adjusted points from 30 to 40
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
MarineCommented:
The problem is in your event declaration
its like this.

Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Caption = "WHATEVER"
End Sub
0
 
Daron1Author Commented:
I guess I need to do the same for the mouseout, right?  This enables the label to be reset to "" or whatever default.
0
 
MarineCommented:
Points are not mine but this is not a website where you can use javascript command mouseout() vb doesn't have that event. What you can do is you can set up a boolean value to see if value has left has changed. Good luck.
0
 
Daron1Author Commented:
I got a slight JavaScript habit, sorry about that. :)  Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now