of this book is a tutorial describingthe fundamental concepts and classes in the Windows Forms API. Itconsists of the following 10 chapters:
,
.NET and Windows Forms OverviewThis chapter provides an overview of the .NET Framework (focusing onthe parts that are relevant to Windows Forms developers) and theWindows Forms API.
,
ControlsThe Control class is at the heart of every Windows Forms application.Its role and usage are examined in detail in this chapter.
,
Forms, Containers, and ApplicationsForms are top-level windows, and almost all Windows Formsapplications use Forms (hence the name). We examine Forms in theirrole as containers for controls. The chapter also discusses howform-based applications are constructed.
,
Menus and ToolbarsMost nontrivial applications use menus and toolbars to present theirfunctionality in a structured way. This chapter shows therelationship between menus, forms, and controls. It also describesthe techniques for dynamically modifying menus in MDI applications.
,
Building ControlsThis chapter shows the techniques for building your own reusable userinterface components. It describes both user controls (collections ofother controls grouped into a reusable element) and custom controls,which give developers complete control over all aspects of thecontrols appearance and behavior.
,
Inheritance and ReuseThe .NET type systems support for inheritance isfundamental to the way in which controls work. describes the role of inheritance in WindowsForms applications. It also highlights the many pitfalls of misuse ofinheritance.
,
Redrawing and GDI+Although GDI+ is not strictly a part of Windows Forms, this powerfuldrawing API gives you the ability to control the appearance of yourprograms. describes how to use GDI+ inyour Windows Forms applications.
,
Property GridsThe Property Grid control is important for two reasons. First, it isa very useful control for presenting and editing information. Second,it is a central part of Visual Studio .NET, and understanding its useis crucial to integrating your controls with the developmentenvironment. This chapter offers thorough coverage of the PropertyGrid control.
,
Controls and the IDEThis chapter describes how to build controls that integrate into theVisual Studio .NET Forms Designer. It shows how to build customcontrol designers and extender property providers.
,
Data BindingWindows Forms has a data-binding architecture that allows any datasource to be bound to any property of a control. describes how to configure these bindings andhow to use the specialized data source class, theDataSet
.
Throughout , code examples are given inboth C# and Visual Basic .NET.
shows VB.NET programmers how toconvert the reference sections C# syntax to VB.NETsyntax.
Assumptions This Book Makes
To program with the Windows Forms API, you must have installed one ofthe many editions of Visual Studio .NET on your system(Standard, Professional, Enterprise, or Architect). Although you canwrite Windows Forms applications using the .NET Framework SDK alone,the Forms Designer is only available with Visual Studio .NET, and itis very hard work to write forms-based applications without the FormsDesigner.
Whats on the CD
The CD that accompanies this book contains a copy of .NETWindows Forms in a Nutshell for Microsoft Visual Studio.NET (view CD content online at ,available to you as a fully integrated member of Visual Studio .NETDynamic Help.
By making .NET Windows Forms in a Nutshell apart of your Visual Studio .NET development environment, you gain thefollowing benefits:
Continuous access to the contents of the .NET Windows Forms QuickReference as you work in the online Visual Studio .NET developmentenvironment
Ability to browse the contents of the book in the Visual Studio .NETHelp Contents window
Constantly updated Dynamic Help links to relevant Quick Referenceentries as you write C# or VB.NET code (these links appear in aseparate Dynamic Help window link group namedOReilly Help )
Links to both Quick Reference topics and Microsoft documentationtopics when you use either the Help Search facility or interactiveIndex
Access to the OReilly web site, http://www.oreilly.com, for additional booksand articles on Visual Basic .NET, C#, and the .NET Framework
Cross-links from Quick Reference topics to related topics in the MSDNdocumentation
For more information on . NET Windows Forms in a Nutshellfor Microsoft Visual Studio .NET , please read the releasenotes on the CD (see http://examples.oreilly.com/netwinformian).
To use .NET Windows Forms in a Nutshell for MicrosoftVisual Studio .NET , you must be running a version ofVisual Basic .NET or Visual Studio .NET on your computer or laptop.To install .NET Windows Forms in a Nutshell for MicrosoftVisual Studio .NET :
Shut down all anti-virus software and be sure that Visual Studio .NETis not currently running.
Place the CD in the CD player (see http://examples.oreilly.com/netwinformian).
If you are running Visual Studio .NET 2003, double-click on theinstallation file named WinFormsinaNutshell2003.msi . If you are stillrunning Visual Studio .NET 2002, double click on the file named WinFormsinaNutshell2002.msi .
Follow the instructions contained in the install program windows. Besure to read and to accept the terms of the software license beforeproceeding.