Search
FlowChart.MouseMove Event
See Also
 



Raised periodically while the user moves the mouse.

 Syntax

VB6  Copy Code

Public Event MouseMove

 Event Data

Parameter

Type

Description

docX

[input] long

The x coordinate of the current mouse position.

docY

[input] long

The y coordinate of the current mouse position.

Dispatch ID: 72

 Remarks

If enabled, this event is raised periodically while the user moves the mouse. Because it might produce some unnecessary overhead, the event firing is disabled by default. You can enable/disable it through the FireMouseMove property. The parameters of the event are expressed in document coordinates.

 Example

Suppose you need to display some text, associated with a diagram node, as a message in the status-bar of your application. The status-bar should be updated while the user moves the mouse around. To implement this functionality you might handle the event as follows:

VB6  Copy Code

Private Sub fc_MouseMove(ByVal docX As Long, ByVal docY As Long)

    Dim obj As Object
    Dim b As box

    'get the object under the mouse pointer
    obj = fc.ObjectFromPoint(docX, docY, True, False)

    If obj Is Nothing Then

        'clear the status bar message
        statusBar.Panels(1).Text = ""
        Exit Sub

    End If

    'if it is a box ...
    If TypeOf obj Is box Then

        b = obj
        statusBar.Panels(1).Text = b.UserString

    End If

End Sub

 See Also