WorkflowDesignerMessageFilter.OnMouseDown(MouseEventArgs) 方法
定义
在单击鼠标按钮时发生。Occurs when a mouse button is clicked.
protected:
virtual bool OnMouseDown(System::Windows::Forms::MouseEventArgs ^ eventArgs);
protected virtual bool OnMouseDown (System.Windows.Forms.MouseEventArgs eventArgs);
abstract member OnMouseDown : System.Windows.Forms.MouseEventArgs -> bool
override this.OnMouseDown : System.Windows.Forms.MouseEventArgs -> bool
Protected Overridable Function OnMouseDown (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.
示例
下面的代码示例演示如何重写 OnMouseDown 方法来返回 false,以便设计器结构中的其他组件可以处理此方法。The following code example shows how to override the OnMouseDown method to return false so that other components in the designer architecture can process the method.
此代码示例摘自 DesignerShell.cs 文件中的基本设计器宿主 SDK 示例。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 OnMouseDown(MouseEventArgs eventArgs)
{
//Allow other components to process this event by not returning true.
this.mouseDown = true;
return false;
}
Protected Overrides Function OnMouseDown(ByVal eventArgs As System.Windows.Forms.MouseEventArgs) As Boolean
' Allow other components to process this event by not returning true.
mouseDown = True
Return False
End Function
注解
在单击鼠标按钮时发生 OnMouseDown。OnMouseDown occurs when a mouse button is clicked.