HandledMouseEventArgs.Handled Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur apakah peristiwa ini harus diteruskan ke kontainer induk kontrol.
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
Nilai Properti
true jika peristiwa mouse harus masuk ke kontrol induk; jika tidak, false.
Contoh
Contoh kode berikut menunjukkan cara menandai peristiwa roda mouse seperti yang ditangani dalam kontrol kustom.
Imports System.Windows.Forms
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