remove event

  • Thread starter Thread starter saeed rezaei
  • Start date Start date
S

saeed rezaei

Hi
we can add user event to class or user control.
but
can we remove some system event from a control.
for examle
remove click method from button control
 
saeed said:
can we remove some system event from a control.
for examle
remove click method from button control

Derive you own Control from the Button class and override the On*
routine associated with that event.

Class customButtom
Inherits Button

Protected Overrides Sub OnClick()
If Me.customBooleanProperty Then
' Raise the Click Event
MyBase.OnClick()
Else
' The Click even will NOT be raised.
End If
End Sub

End Class

HTH,
Phill W.
 
Back
Top