Solved

mouseover

Posted on 2000-04-13
7
153 Views
Last Modified: 2010-05-02
I want to show text in a label.caption whenever the mouse is over a command button on a form.  Is this possible?
0
Comment
Question by:Daron1
  • 4
  • 2
7 Comments
 
LVL 1

Accepted Solution

by:
Gotcha007 earned 40 total points
Comment Utility
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
 

Author Comment

by:Daron1
Comment Utility
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
 

Author Comment

by:Daron1
Comment Utility
Adjusted points from 30 to 40
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 6

Expert Comment

by:Marine
Comment Utility
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
 

Author Comment

by:Daron1
Comment Utility
I guess I need to do the same for the mouseout, right?  This enables the label to be reset to "" or whatever default.
0
 
LVL 6

Expert Comment

by:Marine
Comment Utility
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
 

Author Comment

by:Daron1
Comment Utility
I got a slight JavaScript habit, sorry about that. :)  Thanks.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now