An Event is a message, which is generated by an object. The object is created by the user actions. The object which generates the event is called as "Event Sender".
For example
Clicking a mouse is also an event.
Pressing keyboard button is also an event.
Two types of events in windows application:
Mouse Events
Keyboard Events
Mouse Events
Description
Mouse Events are raised due to the Mouse. That means if the user performs any action through the mouse, Then the events which are raised are called as Mouse Events.
Example
Clicking a mouse is a mouse event.
See the below code to know about the button Click event which is mouse event.
[csharp]private void button1_Click(object sender, EventArgs e)
{
}[/csharp]
Keyboard Events
Description
Keyboard Events are raised due to the Keyboard. That means if the user performs any action through the Keyboard, then the events which are raised are called as keyboard Events.
Example
Pressing a keyboard button is a keyboard event.
The following things can be explained in the later chapters.