By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,749 Members | 1,627 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,749 IT Pros & Developers. It's quick & easy.

remove event

P: n/a
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

Jun 23 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
RemoveHandler
--
David Anton
www.tangiblesoftwaresolutions.com
Convert between VB, C#, C++, and Python
Instant C#
Instant VB
Instant C++
Instant Python
C++ to C# Converter
C++ to VB Converter
"saeed rezaei" wrote:
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

Jun 23 '07 #2

P: n/a
saeed rezaei wrote:
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.
Jun 25 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.