View contents of this chapter

Events

Command button, icons, text boxes, option buttons and menu bars are all windows. The MS Windows operating system manages all of these many windows by assigning each one a unique id number (window handle or hWnd). Windows programs responds to events. An event might come to a program from any control or from an internal activity, such as PC's clock.

The operating system continually monitors each of these windows for signs of activity or events. Events can occur through user actions such as a mouse click or a key press, through programmatic control, or even as a result of another window's actions.

Play Sound An event is an activity that occurs during a program's execution.

Each time an event occurs, it causes a message to be sent to the operating system. The OS handles a few events but passes most to the programs currently running. Each program can then take the appropriate action based on its own instructions for dealing with that particular event.



© Universal Teacher Publications        INDEX Previous Screen Next Screen