WorkflowDesignerMessageFilter.OnMouseWheel(MouseEventArgs) 方法
定义
当鼠标滚轮移动时发生。Occurs when the mouse wheel moves.
protected:
virtual bool OnMouseWheel(System::Windows::Forms::MouseEventArgs ^ eventArgs);
protected virtual bool OnMouseWheel (System.Windows.Forms.MouseEventArgs eventArgs);
abstract member OnMouseWheel : System.Windows.Forms.MouseEventArgs -> bool
override this.OnMouseWheel : System.Windows.Forms.MouseEventArgs -> bool
Protected Overridable Function OnMouseWheel (eventArgs As MouseEventArgs) As Boolean
参数
- eventArgs
- MouseEventArgs
一个 MouseEventArgs,包含有关事件的信息。A MouseEventArgs that contains information about the event.
返回
如果消息已处理,则为 true;否则为 false。true if the message is handled; otherwise, false.
示例
下面的代码示例演示如何重写 OnMouseWheel 方法,从而根据 WorkflowView 的 Delta 属性来缩放 MouseEventArgs 对象并返回 false,以便设计器结构中的其他组件可以处理此方法。The following code example shows how to override the OnMouseWheel method to zoom the WorkflowView object based on the Delta property of the MouseEventArgs and to return false so that other components in the designer architecture can process the method.
protected override bool OnMouseWheel(MouseEventArgs eventArgs)
{
mouseDown = false;
return true;
}
Protected Overrides Function OnMouseWheel(ByVal eventArgs As MouseEventArgs) As Boolean
mouseDown = False
Return True
End Function
注解
当鼠标滚轮移动时发生 OnMouseWheel。OnMouseWheel occurs when the mouse wheel moves.