Tools Used : Visual C# .NET
Handling events in C# is little bit tricky than in C++ or VB. In C#, you write a delegate and then write an event handler. These event handlers are overridable public events defined in the Control or other WinForms classes.
1. Write a Delegate
I want to handle Mouse Down events and do something when left or right mouse buttons are pressed. Write this line of code in your InitializeComponent function.
2. Write the Event
Now you write the event handle. The output parameter of your event returns System.WinForms.MouseEventArgs object which gives you the details about mouse down such as what button is pressed or how many times. Here are MouseEventArgs members.
MouseEventArgs members
Event Handler