General information
Title:
How to override a click method in a button on a form?
Hi, I'm trying to learn C# and MM.net, so please forgive me for asking a very basic question... I drop a button control on a form, then I double-click on the button to create the Click event handler Btn1_Click() on the form. I understand that this is a handler that gets executed *after* the click() method in the button class fires. My question is, how can you actually override a click method of a button dropped on a form? If that button class had some code in its click method that I didn't want to fire, how would I do it? Do I have to create a sub-class of the button first and then drop that on the form, and put my code in the sub-classed click method? And do that for each button I want to put code in? Seems it would get confusing with all those sub-classed controls. Thanks IA.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only