WorkflowDesignerMessageFilter.OnMouseMove(MouseEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the mouse pointer moves while within the bounds of an object.
protected:
virtual bool OnMouseMove(System::Windows::Forms::MouseEventArgs ^ eventArgs);
protected virtual bool OnMouseMove (System.Windows.Forms.MouseEventArgs eventArgs);
abstract member OnMouseMove : System.Windows.Forms.MouseEventArgs -> bool
override this.OnMouseMove : System.Windows.Forms.MouseEventArgs -> bool
Protected Overridable Function OnMouseMove (eventArgs As MouseEventArgs) As Boolean
Parameters
- eventArgs
- MouseEventArgs
A MouseEventArgs that contains information about the event.
Returns
true
if the message is handled; otherwise, false
.
Examples
The following code example shows how to override the OnMouseMove method to return the scroll position and to return false
so that other components in the designer architecture can process the method.
This code example is part of the Basic Designer Hosting SDK Sample from the DesignerShell.cs file. For more information, see Basic Designer Hosting.
protected override bool OnMouseMove(MouseEventArgs eventArgs)
{
//Allow other components to process this event by not returning true.
if (mouseDown)
{
workflowView.ScrollPosition = new Point(eventArgs.X, eventArgs.Y);
}
return false;
}
Protected Overrides Function OnMouseMove(ByVal eventArgs As System.Windows.Forms.MouseEventArgs) As Boolean
' Allow other components to process this event by not returning true.
If mouseDown Then
workflowView.ScrollPosition = New Point(eventArgs.X, eventArgs.Y)
End If
Return False
End Function
Remarks
OnMouseMove occurs when the mouse pointer moves while within the bounds of an object.