[AccessD] How to tell a button's "air space" is no longer beinghovered over

A.D. Tejpal adtp at airtelmail.in
Mon Jul 4 09:22:34 CDT 2011


William,

    For detecting whether the mouse pointer has moved away from the control in question, you can use the MouseMove event of form section to which the said control belongs, for example:

' Code in form's module
'=============================
Private Sub Detail_MouseMove( _
                Button As Integer, Shift As Integer,  _
                X As Single, Y As Single)

    ' <<Your Code>>

End Sub
'--------------------------------------------

Private Sub FormFooter_MouseMove( _
                Button As Integer, Shift As Integer,  _
                X As Single, Y As Single)

    ' <<Your Code>>

End Sub
'--------------------------------------------

Private Sub FormHeader_MouseMove( _
                Button As Integer, Shift As Integer,  _
                X As Single, Y As Single)

    ' <<Your Code>>

End Sub
'=============================

Best wishes,
A.D. Tejpal
------------

  ----- Original Message ----- 
  From: William Benson (VBACreations.Com) 
  To: 'Access Developers discussion and problem solving' 
  Sent: Sunday, July 03, 2011 01:23
  Subject: [AccessD] How to tell a button's "air space" is no longer beinghovered over


  I have some code which changes the caption of a button when the user has the
  ctrl key pressed, set during the mousemove event for the button.

  I want however, that when the user leaves the "air space" for the button,
  then the caption reverts - regardless whether they still have shift held.

  I know I can use use the mousemove event associated with all surrounding
  controls to reset it, but I would like something more related to the control
  itself. 

  Is there a method of testing that the user has moved the mouse outside the
  button's air space? 

  I have a feeling I am going to be out of luck...


More information about the AccessD mailing list