WorkflowDesignerMessageFilter.OnMouseDown(MouseEventArgs) 方法

定義

發生於按一下滑鼠按鈕時。

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,包含事件的相關資訊。

傳回

如果要處理訊息為 true,否則為 false

範例

下列程式碼範例示範如何覆寫 OnMouseDown 方法以傳回 false,讓設計工具結構中的其他元件也可以處理方法。

這個程式碼範例是 DesignerShell.cs 檔案中<Basic Designer Hosting SDK>範例的一部分。 如需詳細資訊,請參閱基本Designer裝載

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 發生於按一下滑鼠按鈕時。

適用於

另請參閱