Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bold on mouse move

Status
Not open for further replies.
Feb 19, 2005
47
0
0
GB
Hi, I have a code that makes a the text on a button go bold on mousemove, and default when the mouse moves away. It works when the user moves the mouse over the button, as the text goes bold, however, when the user moves the mouse away from the button, the text does not return to default. the code I am using is as follows:

Private Sub cmdClose_MouseMove(Button As Integer, Shift As Integer, X AsSingle Y As Single)

cmdClose.FontBold = True.

The code to turn bold off is exactly the same apart from Form_MouseMove instead of cmdCloseMouseMove, and true is false. What am I doing wrong?
 
place this in the detail sections mousemove event. Assuming the button is in the detail section

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
cmdclose.FontBold = False
End Sub

the buttons event is fired when you move it over the mouse once you leave the mouse the detail sections event is fired
 
Thank you ever so much! this has been bothering me for weeks and you have really helped me out. Much appreciated, be assured I will leave a star!
 
I thought i could use this routine but i get an error "object required".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top