Windows Forms

WHAT You WILL LEARN IN THis CHAPTER_

> How to construct a Windows Forms application

> How to control the startup and organization of your forms

> Important controls available in Windows Forms and how to take advantage of their capabilities

> Usage of special families of controls and components, such as extender providers, common dialogs, and the ToolStrip

> Programming tips for a variety of programming scenarios

Windows Forms is a part of the .NET Framework that is used to create user interfaces for local applications, often called Win32 clients. Windows Forms does not change when moving from Visual Basic 2005 or Visual Basic 2008 to Visual Basic 2010. Accordingly, the version number used for Windows Forms in Visual Studio 2010 is still 2.0.

The pace of change in Windows Forms is slowing because of the advent of Windows Presentation Foundation (WPF). Going forward, you can expect continued innovation in WPF, but not much in Windows Forms. However, that does not imply that you should abandon Windows Forms or be reluctant to write programs in it. Windows Forms still has many advantages over WPF.

Those advantages include a more complete set of controls and a mature, easy-to-use designer. The result is often faster development in Windows Forms compared to WPF. WPF has advantages of its own, of course. These are discussed in Chapter 17, which provides an introduction to WPF.

Chapter 15 includes more advanced treatment of certain aspects of Windows Forms. After gaining a basic understanding of the key capabilities in this chapter, you'll be ready to go on to the more advanced concepts in that chapter.

You've already seen how namespaces are used to organize related classes in the .NET Framework. The main namespace used for Windows Forms classes is System.Windows.Forms. The classes in this namespace are contained in the System.Windows.Forms.dll assembly.

THE sYsTEM.WINDows.FoRMs NAMEsPACE

If you choose a Windows Forms Application project or Windows Forms Control Library project in VS.NET, a reference to System.Windows.Forms.dll is added by default. In some other cases, such as creating a library that will work with controls, you need to add that reference manually. (You can learn more about creating controls in Windows Forms in Chapter 15.)

0 0

Post a comment