HandledMouseEventArgs.Handled 屬性

定義

取得或設定是否這個事件應該轉寄至控制項的父容器。

public:
 property bool Handled { bool get(); void set(bool value); };
public bool Handled { get; set; }
member this.Handled : bool with get, set
Public Property Handled As Boolean

屬性值

Boolean

如果滑鼠事件應該移至父控制項則為 true,否則為 false

範例

下列程式碼範例示範如何將滑鼠滾輪事件標示為在自訂控制項中處理。

Public Class MouseWheelControl
    Sub New()
        ' Add initialization code for the control here. 
    End Sub

    Protected Sub MouseWheelControl_MouseWheel(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseWheel
        Dim Hme As HandledMouseEventArgs = e
        Hme.Handled = True
        ' Perform custom mouse wheel action here. 
    End Sub
End Class

適用於