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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top