欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

.NET RadioButton 触发双击事件

程序员文章站 2022-05-28 22:53:54
参考自:https://www.experts-exchange.com/questions/27924642/VB-NET-2008-Radio-Button-Double-Click.html ......
Public Class DoubleClickRadioButton 
    Inherits System.Windows.Forms.RadioButton 

    Public Sub New() 
        Me.SetStyle(ControlStyles.StandardClick Or ControlStyles.StandardDoubleClick, True) 
    End Sub 
    'NEW EVENTS THAT WILL NOW BE EXPOSED 
    Public Shadows Event MouseDoubleClick As MouseEventHandler 

    'DELEGATES TO HANDLE PROCESSING OF THE EVENTS 
    Public Delegate Sub MouseEventHandler(ByVal sender As Object, ByVal e As MouseEventArgs) 

    Protected Overrides Sub onMouseDoubleClick(ByVal e As MouseEventArgs) 
        RaiseEvent MouseDoubleClick(Me, e) 
    End Sub 
End Class 

 参考自: