MouseHoverChild Event

Applies to:  Subclasser object
See also:  MouseEnterChild event, MouseLeaveChild event, MouseHoverControl event, Event Index

The MouseHoverChild event occurs when the subclassed window has captured mouse input, and the mouse pointer moves into a child window of the subclassed window, and remains within that child window for the number of milliseconds determined by the HoverTime property of the Subclasser object.

Syntax:

Private Sub object_MouseHoverChild(ByVal hWndChild As Long)

The MouseHoverChild event syntax has these parts:

Part Description
object The name of a SubClasser object, declared using WithEvents.
hWndChild The handle of the child window into which the mouse pointer has moved.

Remarks:

The MouseEnterChild event is only raised if the subclassed window has captured mouse input.  To enable the MouseEnterChild event, call TrackMouse in the MouseEnter event.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow.  This will disable normal processing of mouse messages by child windows, and will allow the Subclasser object to handle messages that would normally be processed by child windows.

Refer to the MouseDownChild example to see how to do this.

Further examples:

Mouse Roll Over (Hard Way)

 

Home

Copyright and Disclaimer