A graphical user interface (GUI) allows a user to interact visually with a program. A GUI (pronounced "GOO-ee") gives a program a distinctive "look" and "feel." Providing different applications with a consistent set of intuitive user-interface components enables users to become productive with each application faster.

Look and Feel Observation 13 1

Consistent user interfaces enable a user to learn new applications more quickly because the applications have the same "look" and "feel."

As an example of a GUI, consider Fig. 13.1, which shows an Internet Explorer Web browser window containing various GUI controls. Near the top of the window, there is a menu bar containing the menus File, Edit, View, Favorites, Tools and Help. Below the menu bar is a set of buttons, each of which has a defined task in Internet Explorer, such as going back to the previously viewed Web page, printing the current page or refreshing the page. Below these buttons lies a combobox, in which users can type the locations of Web sites that they wish to visit. To the left of the combobox is a label (Address) that indicates the combobox's purpose (in this case, entering the location of a Web site). Scrollbars are located at the right side and bottom of the window. Usually, scrollbars appear when a window contains more information than can be displayed in the window's viewable area. Scrollbars enable a user to view different portions of the window's contents. These controls form a user-friendly interface through which the user interacts with the Internet Explorer Web browser.

Figure 13.1. GUI controls in an Internet Explorer window.

GUIs are built from GUI controls (which are sometimes called components or widgetsshort for window gadgets). GUI controls are objects that can display information on the screen or enable users to interact with an application via the mouse, keyboard or some other form of input (such as voice commands). Several common GUI controls are listed in Fig. 13.2in the sections that follow and in Chapter 14, we discuss each of these in detail. Chapter 14 also explores the features and properties of additional GUI controls.

Figure 13.2. Some basic GUI controls.




Displays images or uneditable text.


Enables the user to enter data via the keyboard. It can also be used to display editable or uneditable text.


Triggers an event when clicked with the mouse.


Specifies an option that can be selected (checked) or unselected (not checked).


Provides a drop-down list of items from which the user can make a selection either by clicking an item in the list or by typing in a box.


Provides a list of items from which the user can make a selection by clicking an item in the list. Multiple elements can be selected.


A container in which controls can be placed and organized.


Enables the user to select from a range of input values.



    Introduction to Computers, the Internet and Visual C#

    Introduction to the Visual C# 2005 Express Edition IDE

    Introduction to C# Applications

    Introduction to Classes and Objects

    Control Statements: Part 1

    Control Statements: Part 2

    Methods: A Deeper Look


    Classes and Objects: A Deeper Look

    Object-Oriented Programming: Inheritance

    Polymorphism, Interfaces & Operator Overloading

    Exception Handling

    Graphical User Interface Concepts: Part 1

    Graphical User Interface Concepts: Part 2


    Strings, Characters and Regular Expressions

    Graphics and Multimedia

    Files and Streams

    Extensible Markup Language (XML)

    Database, SQL and ADO.NET

    ASP.NET 2.0, Web Forms and Web Controls

    Web Services

    Networking: Streams-Based Sockets and Datagrams

    Searching and Sorting

    Data Structures



    Appendix A. Operator Precedence Chart

    Appendix B. Number Systems

    Appendix C. Using the Visual Studio 2005 Debugger

    Appendix D. ASCII Character Set

    Appendix E. Unicode®

    Appendix F. Introduction to XHTML: Part 1

    Appendix G. Introduction to XHTML: Part 2

    Appendix H. HTML/XHTML Special Characters

    Appendix I. HTML/XHTML Colors

    Appendix J. ATM Case Study Code

    Appendix K. UML 2: Additional Diagram Types

    Appendix L. Simple Types


    Visual C# How to Program
    Visual C# 2005 How to Program (2nd Edition)
    ISBN: 0131525239
    EAN: 2147483647
    Year: 2004
    Pages: 600 © 2008-2020.
    If you may any questions please contact us: