TrackMouse Method

Applies to:  Subclasser object, PowerForm control, Panel Control
See also:  ReleaseMouse Method, MouseEnter Event, MouseLeave Event, Method and Function Index

Sets mouse input capture.

Syntax:

object.TrackMouse

The TrackMouse syntax has these parts:

Part Description
object The name of an object in the Applies to list.  If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

Call TrackMouse in response to a MouseEnter event, in order to enable the MouseHover event.

The Subclasser object and PowerForm control automatically release mouse input capture when the mouse pointer leaves the subclassed window, so if TrackMouse is called in response to a MouseEnter event, there is no need to explicity call ReleaseMouse.

To continue to receive mouse events after the mouse pointer has left the window, cancel the MouseLeave event.

Home

Copyright and Disclaimer