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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Underline Caption in CmdButton on Mousemove

Status
Not open for further replies.

deadhead7

Programmer
Apr 18, 2003
57
US
How can I Have a caption in a command button underline when the mouse pointer is moved over it.
 
Add the following code to change the command buttons .FontUnderline property,

Code:
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   Command1.FontUnderline = True
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   Command1.FontUnderline = False
End Sub





zemp
 
This will work most of the time, but if you move the mouse quickly enough, and it ends up on another control or off of the form entirely, then the form mousemove event will not be called.

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top