HandledMouseEventArgs.Handled 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定是否這個事件應該轉寄至控制項的父容器。
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
屬性值
如果滑鼠事件應該移至父控制項則為 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