I had a similar problem (get Enter/Exit events) that I solved with a dirty trick, that works as long as the button is on a form. Otherwise you have to catch the mouse event of the button container.
I tried to use the SetCapture and ReleaseCapture API, but I had so much trouble that at the end decided for the 'easy' way.
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Command1.Tag = "" Then
Command1.Tag = "1" '' I'm in
'' start date = Now
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Command1.Tag = "1" Then
Command1.Tag = "" '' I'm out
'' total time = total time + (now - start date)