. . .The user should feel in control of the computer; not the other way around. This is achieved in applications that embody three qualities: responsiveness, permissiveness, and consistency.
Apple Computer, Inc.
All the better to see you with, my dear.
The Big Bad Wolf to Little Red Riding Hood
. . .the wisest prophets make sure of the event first.
Horace Walpole
Objectives
In this chapter you will learn:
Design principles of graphical user interfaces (GUIs).
How to create graphical user interfaces.
How to process events that are generated by user interactions with GUI controls.
The namespaces that contain the classes for graphical user interface controls and event handling.
How to create and manipulate Button, Label, RadioButton, CheckBox, TextBox, Panel and NumericUpDown controls.
How to add descriptive ToolTips to GUI controls.
How to process mouse and keyboard events.
Outline
13.1 Introduction
13.2 Windows Forms
13.3 Event Handling
13.3.1 A Simple Event-Driven GUI
13.3.2 Another Look at the Visual Studio Generated Code