Muhammad Essam
Muhammad Essam

Reputation: 57

Handling Events in GUI C# application

Why overriding the onclick method for example in a form (just overriding not calling) that will handle the event like in the picture : showing the onClick method would change the color but never been called only overrided

why this is happening why not using instead of publishing and registering the event

Upvotes: 0

Views: 89

Answers (1)

MichaelThePotato
MichaelThePotato

Reputation: 1525

If you want you can access the object as a member from any part of your class and register to its event. WinForms auto generates code which does the event firing and registration for you.

Upvotes: 1

Related Questions