Manipulacion de formularios csharp

Páginas: 51 (12630 palabras) Publicado: 6 de septiembre de 2012
CHAPTER 1

Windows Forms and the User Interface
W
indows Forms are the basis for most Microsoft Windows applications and can be configured to provide a variety of user interface (UI) options. The developer can create forms of various sizes and shapes and customize them to the user’s needs. Forms are hosts for controls, which provide the main functionality of the UI. Special controls calledcontainer controls can be used to control the layout of the UI.

Exam objectives in this chapter:
Add and configure a Windows Form. Add a Windows Form to a project at design time. Configure a Windows Form to control accessibility, appearance, behavior, configuration, data, design, focus, layout, style, and other functionality. Manage control layout on a Windows Form. Group and arrange controls byusing the Panel control, GroupBox control, TabControl control, FlowLayoutPanel control, and TableLayoutPanel control. Use the SplitContainer control to create dynamic container areas. Add and configure a Windows Forms control. Use the integrated development environment (IDE) to add a control to a Windows Form or other container control of a project at design time. Add controls to a Windows Form at runtime.

Lessons in this chapter:
Adding and Configuring Windows Forms
3 22

Managing Control Layout with Container Controls

CHAPTER 1

1

Before You Begin
To complete the lessons in this chapter, you must be familiar with Microsoft Visual Basic or Microsoft Visual C# and be comfortable with the following tasks: Opening Microsoft Visual Studio and creating a Windows Forms projectDragging controls from the Toolbox to the Designer Setting properties in the Properties window

REAL WORLD
Matt Stoecker

W

hen I develop a Windows Forms application, I pay special attention to the design of the UI. A well-thought-out UI that flows logically can help pro-

vide a consistent user experience from application to application and make it easy for users to learn new applications.Familiarity and common themes translate into increased productivity.

2

CHAPTER 1

Windows Forms and the User Interface

Lesson 1: Adding and Configuring Windows Forms
This lesson describes how to create and configure Windows Forms. You will learn how to create forms and refer to them in code, alter the visual properties of the form, and control the behavior of the form at run time.After this lesson, you will be able to:
Add a Windows Form to a project at design time. Add a new Windows Form at run time. Resize a window at design time or run time. Identify and set the properties that determine a form’s appearance and behavior at run time. Refer to the default instance of a form in code. Create a nonrectangular form.

Estimated lesson time: 45 minutes

Overview of WindowsForms
Windows Forms are the basic building blocks of the UI. They provide a container that hosts controls and menus and allow you to present an application in a familiar and consistent fashion. Forms can receive user input in the form of keystrokes or mouse interactions and can display data to the user through hosted controls. Although it is possible to create applications that do not containforms, such as console applications or services, most applications that require sustained user interaction will include at least one Windows Form, and complex applications frequently require several forms to allow the program to execute in a consistent and logical fashion. When you create a new Windows Forms project, a form named Form1 is added to your project by default. You can edit your form byadding controls and other visual elements in the Designer, which is a graphic representation of a designable, visual element (such as a Form) that appears in the Visual Studio Integrated Development Environment (IDE). The Visual Studio IDE is shown in Figure 1-1.

Lesson 1: Adding and Configuring Windows Forms

CHAPTER 1

3

FIGURE 1-1 A Windows Form in the Visual Studio IDE

Adding Forms...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Csharp
  • Csharp
  • CSHARP
  • csharp
  • Csharp
  • Csharp
  • Programacion En Csharp
  • Manual en csharp

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS