30.07.2013 Views

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

476 Graphical User Interface Concepts: Part 1 Chapter 12<br />

Outline<br />

12.1 Introduction<br />

12.2 Windows Forms<br />

12.3 Event-Handling Model<br />

12.4 Control Properties and Layout<br />

12.5 Labels, TextBoxes and But<strong>to</strong>ns<br />

12.6 GroupBoxes and Panels<br />

12.7 CheckBoxes and RadioBut<strong>to</strong>ns<br />

12.8 PictureBoxes<br />

12.9 Mouse-Event Handling<br />

12.10 Keyboard-Event Handling<br />

Summary Terminology Self-Review Exercises Answers <strong>to</strong> Self-Review Exercises Exercises<br />

12.1 Introduction<br />

A graphical user interface (GUI) allows a user <strong>to</strong> interact visually with a program. A GUI<br />

(pronounced “GOO-ee”) gives a program a distinctive “look” and “feel.” By providing different<br />

applications with a consistent set of intuitive user-interface components, GUIs enable<br />

users <strong>to</strong> spend less time trying <strong>to</strong> remember which keystroke sequences perform what<br />

functions, freeing up time that can be spent using the program in a productive manner.<br />

Look-and-Feel Observation 12.1<br />

Consistent user interfaces enable a user <strong>to</strong> learn new applications more quickly. 12.1<br />

As an example of a GUI, Fig. 12.1 depicts an Internet Explorer window in which various<br />

GUI components have been labeled. Near the <strong>to</strong>p of the window, there is a menu bar<br />

containing menus, including File, Edit, View, Favorites, Tools and Help. Below the<br />

menu bar is a set of but<strong>to</strong>ns, each of which has a defined task in Internet Explorer. Below<br />

these but<strong>to</strong>ns lies a textbox, in which users can type the locations of World Wide Web sites<br />

that they wish <strong>to</strong> visit. To the left of the textbox is a label that indicates the textbox’s purpose.<br />

Scrollbars are situated on the far right and bot<strong>to</strong>m of the window. Usually, scrollbars<br />

are employed when a window contains more information than can be displayed in the<br />

window’s viewable area. By clicking the scrollbars, the user can view different portions of<br />

the window. These components form a user-friendly interface through which the user interacts<br />

with the Internet Explorer Web browser.<br />

GUIs are built from GUI components (which are sometimes called controls or widgets—short<br />

for window gadgets). A GUI component is an object with which the user interacts<br />

via the mouse or keyboard. Several common GUI components are listed in Fig. 12.2.<br />

In the sections that follow, we discuss each of these GUI components in detail. The next<br />

chapter explores the features and properties of more advanced GUI components.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!