Windows, along with other Graphical User Interfaces (GUIs) such as those for the Macintosh, Linux, Amiga, Atari, GEM, etc - see www.toastytech.com for further details) is an event-driven operating system. Operating systems of this kind wait for events enacted by the user and respond to such events with an 'event handler', a piece of code that responds to the particular event. Common events in this type of environment include moving or clicking the mouse, pressing a key on the keyboard and clicking with the mouse on a control such as a button or menu item.
This type of environment was developed at the Xerox Palo Alto Research Centre (PARC) in the early 1970s and was named the 'WIMP' environment (for Windows, Menus, Mouse and Pull-down menus). The event-driven WIMP environment for computer operating systems is in sharp contrast to the command-driven interface of operating systems such as DOS where commands are issued from a keyboard.
This determines which component on a form has initial focus when a form is activated.
This is a common event for controls where users enter text or select items from a list. The event is triggered as soon as the item changes.
This is a common event, often associated with buttons (which are designed to be clicked).
Event triggered when the user closes a form. The event handler will typically ask the user to confirm that he really does want to close the form.