GDI+ is the underlying graphical APl of the .NET Framework. It contains the classes you need in order to perform graphical programming tasks, from simple drawing routines to Windows Forms custom controls and complex web-based server controls. Its intuitive and clear structure provides the Windows programmer with new opportunities to exploit, and makes the production of custom controls for Windows Forms and Web Forms
significantly easier.
This book will guide you through the details of GDI+ programming and provide you with all the information you will need to build powerful and productive custom controls for rich-client and web applications. It will also demonstrate how to integrate your controls with the Visual Studio .NET IDE in order to empower the developer.
Who is this book for?
This book is for intermediate to advanced C# programmers, who have a good working knowledge of the .NET Framework and the Visual Studio .NET IDE, and wish to develop their understanding of GDI+ and custom control implementation in .NET.
What is covered in this book?
An introduction to the purpose and structure of GDI+
Explanation and demonstration of drawing surfaces, coordinate systems, and units
Subject-by-subject breakdown of the components of GDI+, including pens, brushes, texts, fonts, images, paths, regions, clipping, invalidation, and transformations
Scrolling, mouse events and cursors, and printing in custom controls
Designing and building Windows Forms custom controls
Support for features available to controls at design time
Using GDI+ in conjunction with ASP. NET, including images, custom server controls, and web services
Introduction
Who is this Book For?
What Does this Book Cover?
What You Need to Use this Book
Style Conventions
Customer Support and Feedback
Source Code and Updates
Errata
Technical Support
p2p.wrox.com
Chapter 1: An Overview of GDI+ and Custom Controls
GDI+ and .NET
What is GDI+?
GDI and GDI+
DirectX and GDI+
The GDI+ Namespaces
Custom Controls
Building Windows Forms Custom Controls
Visual Studio .NET Support for Custom Controls
Web Forms Custom Controls
Using Image-Generating Custom Controls
Creating Generic Code for both Windows Forms and Web Forms
A First Example
Creating a New Project
Coping with Namespaces and Assemblies
using the Console in a Windows Application
Classes that Implement IDisposable
Summary
Chapter 2: Drawing Surfaces
Drawing Surfaces
Raster-based and Vector-based Drawing Surfaces
The Characteristics of a Drawing Surface
The Size of a Drawing Surface
The Resolution of a Drawing Surface
The Color Depth of a Drawing Surface
The Color Structure
The Alpha Component
Drawing Surfaces in Different Environments
Drawing Windows Forms
Drawing Pages for a Printer
Drawing Images
A Summary of Drawing Surfaces
The Graphics Class
Creating a Graphics Object for a Form
Creating a Graphics Object for a Printer or image
Drawing onto a Drawing Surface
Other Functionality from the Graphics Class
The GDI+ Coordinate System
Using the Coordinate System to Draw Lines
Aliasing and Anti-aliasing
Limitations of the Coordinate System
Coordinate Data Types
Floating-Point Coordinates
The Coordinate System Origin
Summary
Chapter 3: Pens and Brushes
Drawing with the Pen Object
Controlling Properties of the Pen
The Width of the Pen
Drawing Dashed Lines
Arrowheads and Other Line Caps
Joining Lines
The Pens Class
Filling with the Brush Object
Using the Brush Classes
The TextureBrush Class
The LinearGradientBrush Class
The PathGradientBrush Class
The HatchBrush Class
The Brushes Class
Creating a Pen from a Brush
A Note about Performance
Summary
Chapter 4: Text and Fonts
An Overview of Text and Fonts
Glyphs, Fonts, and Typefaces
A Summary of Terminology
Working with Fonts in GDI+
The FontFamily Class
The Font Class
Using the Default Font
Drawing Basic Text
Drawing Text in a Bounding Rectangle
Formatting Text
Font Styles
Lines, Alignment, and Orientation
Multi*line Text
Horizontally and Vertically Centered Text
Drawing Vertical Text
Tab Stops
Displaying Text using a Brush
Dealing with Fonts
Finding Available Fonts
Font Metrics and Precision Text Placement
Design Units and Resolution
Quality of Text
Drawing without ClearType Font Features
Using ClearType Font Features
Setting the GraphicsUnit for a Font
Summary
/
Chapter 5: Images
An Overview of Image Handling
The Image, Bitmap, and Metafile Classes
The Image Class
The Bitmap Class
Different Types of Bitmap
Color Depth
Compression Formats
Encoders and Decoders
Pixel Format
Available Pixel Formats
Capabilities of an Image
Taking the Easy Option
Displaying Images
Checking the Size and Resolution
Controlling the Scaling of an Image
Changing the Resolution of a Bitmap
Image Resizing and Interpolation
Using Interpolation Mode to Control Image Quality
Manipulating Images
Cropping an Image
Skewing, Reflecting, and Rotating an Image
Skewing an Image
Reflecting an Image
Rotating an Image
Cloning an Image
Getting a Thumbnail of an Image
Creating and Drawing into an Image
Creating a New Bitmap
Drawing our First Image
Double-buffering
Using the SetStyle Method
Working with Alpha in Images
Getting and Setting Pixels
Setting Alpha for an Entire Image
Creating Semi-transparent Images
Playing an Animation
Converting a BMP to a JPEG
Controlling the Compression Level
Summary
Chapter 6: GraphicsPaths and Regions
What are GraphicsPaths and Regions?
The GraphicsPath Class
Composing a GraphicsPath
GraphicsPath Properties and Methods
The Region Class
Creating a Region from a GraphicsPath
Creating a Region from a Rectangle
Creating a Region from Another Region
Unions and Intersections of Regions
Methods of the Region Class
Summary
Chapter 7: Clipping and Invalidation
The Clipping Region
Cropping with the Clipping Region
Using the SetClip Method
Unusual Clipping Regions
SetClip Method Overloads
Other Clipping Region Methods and Properties
Selective Repainting with the Clipping Region
Watching the ClipRectangle
Using the ClipRectangle to Minimize Drawing Work
Forcing a Repaint of the Entire Window
Clipping at the Pixel Level
Invalidation
Using State in our Control
How Invalidation Works
An Example
A Few Clipping Tips
Summary
Chapter 8: Transformations
Transformations in GDI+
Coordinate Systems and Transformations
World Transformations
Scaling Transformations
Translation Transformations
Rotation Transformations
Composite Transformations
An Aside - Transformations and Matrices
Reflection Transformations
Shearing Transformations
Invalidation and Clipping
Transformations and Custom Controls
Summary
Chapter 9: Printing
The Printing Process
The Printing-related Classes in GDI+
How is a Document Printed or Print-previewed?
What Happens When a User Elects to Print
What Happens When a the User Elects to Print Preview
Using the Printing Classes
A Simple Printing Example
Adding Printing-Event and Menu Handlers
Printing to More than One Page
Selecting the Unit of Measurement
Default Graphics Units
Drawing Using Inches
The Ruler Printing Example
Printing Metrics
Displaying Printing Metrics
Controlling the Printer Drawing Surface
The Order of Precedence of Settings
Changing Printing Metrics Programmatieally
Changing Metrics for the Entire Print Job
Where the User Changes the Settings
The Page Setup Dialog
The Print Dialog
Summary
Chapter 10: An Alternative Coordinate System
Defining the Problem
The Outline Model Coordinate System
The GraphicsOM Class
Building the GraphicsOM DLL
Using the GraphicsOM Class
The Effect of Using the GraphicsOM Class
Design Patterns and the Graphics Outline Model
Creating a 3D Effect
Using System Colors
Drawing 3D Lines and Rectangles
GraphicsOM 3D Source Code
Summary
Chapter 11: Architecture and Design of Windows Forms Custom Controls
Basic Principles
What is a Component?
What is a Custom Control?
Building a Windows Forms Custom Control
The Simple Custom Control Sample
Using a Custom Control
Customizing the Toolbox
Creating a Test Application
Components and Custom Controls
Deploying a Windows Forms Custom Control
Adding Properties to our Custom Control
Custom Control with Properties Example
Creating a Test Application
Default Values of Properties
Custom Control with Default Property Values Sample
More Efficient Code
Focus
Focus Cues
Steps to Implement a Focusable Control
Focusable Control Example
Creating the Control
Painting the Control
Invoking the Method to Paint the Control
Enabling the Mnemonic Key
Responding to User Events
Creating a Test Application
Generating Events
Overview of Delegates and Events
Events Example
Create a Test Application
Deriving from an Existing Control
NumberTextBox Example
Creating the Controt
Creating a Test Application
Composite Custom Controls
DataButtons Example
Create a Test Application
Designing Components and Custom Controls
Advantages of Non-Procedural Constructs
Designing Components Using this Philosophy
Designing Events
Summary
Chapter 12: Design-Time Support
Basic Concepts
Editing Properties in the Properties Window
Categorizing Properties
Expanding Composite Properties and Converting to Strings
Custom Property Editors
Editing the Control in the Design View
Categorizing Properties and Events
Improved Editing in the Properties Window
The NumberRange Struct
The TypeConverter-Derived Class
Type Conversion Methods
Sub-Properties
Dealing with Immutable Classes
The NumberTextBoxA Control
Creating a Test Application
Debugging Design-Time Code
Creating a Modal Dialog Box Property Editor
The NumberTextBoxB Control
The NumberRangeDialog
The NumberRangeEditor
Creating a Test Application
Creating a Drop-Down Property Editor
The NumberRangeDropDown Control
The NumberRangeEditor
Creating a Test Application
Implementing a Custom Designer
The SimpleBlankControl
Building the Control
Building the Designer
Testing the Project
The SimpteLineControl
Building the SimpleLineControl
The SimpleLineControlDesigner
Summary
Chapter 13: Scrolling
Building a Scrolling Sample
Setting the Scrollbar Position
Drawing in a Viewport
Scrolling Techniques
Which Approach do I Use?
Placing a Non-Scrollable Control in a Panel
Smooth Scrolling
The SmoothScrollableControl Sample
Testing the Control
Summary
Chapter 14: Mouse Events and Cursors
Mouse Events
Mouse Cursors
Standard Mouse Cursors
The CursorsExample
Custom Mouse Cursors
Hit Testing and Drawing During Mouse Events
The HitTestExample
Mouse Event Routing
The RoutingMouseEvents Sample
Handling the CaptureChanged Event
GDI and BitBIt
Why Use GDI?
Using BitBItO
The Simple BitBitExample
Drawing While Dragging
The AlphaDragExample
Compiling with Unsafe Code
Coding up Drawing While Dragging
Improving Drawing Performance
Drag-Scrolling
Demonstrating the 'wiggle-the-Mouse Bug'
Removing the Wiggle Bug
Summary
Chapter 15: GDI+ Images in ASP.NET
Internet Information Services (liS)
Documentation
Security and Virtual Directories
Reading and Serving Images
Streams
Reading an Image from a Remote Web Server
Mixing HTML and Dynamic Images
Modifying Images
Creating a New Image
Rotating, Flipping, and TextureBrushes
Pie Charts
Summary
Chapter 16' Creating Custom ASP.NET Server Controls
Custom Controls
Creating an ASP.NET User Control
User Control Properties
A Custom Button User Control
Creating a Thumbnail Control
Making a Thumbnail
Creating a Custom Control
Creating a Thumbnail Picture Gallery
Design-Time Support
Creating a Toolbox Icon
Other Design-Time Features
Summary
Chapter 17.' Web Services and GDI+
What are Web Services?
How can GDI+ be used with a Web Service?
A Simple Web Service
The Hello World Web Service
Returning an Image URL
The Image URL Web Service
Returning Image Data
Summary
Index
The release of the .NET Framework has changed the programming landscape for those seeking to develop applications for Microsoft-based customers. New object-oriented languages such as C4~ and Visual Basic .NET have been created specifically for this new platform, and so much of the knowledge acquired in previous environments needs to be migrated and new opportunities need to be identified.
The area of graphics programming has been affected as much as any other. Whereas the Windows Graphical Device Interface (GDI) was once used to facilitate custom drawing to a device, the .NET Framework now gives us GDI+. GDI+ consists of a number of namespaces and classes, made available as part of the .NET Framework, and designed specifically to allow us to carry out custom drawing in our web and Windows controls. Effectively acting as a wrapper around the old GDI, GDI+ provides an easy-to-understand, inheritance-based object model for use by .NET programmers.
The sheer usability of GDI+ may draw many more programmers into custom drawing. Those from a C++/MFC background will already be familiar with many of the approaches in GDI+, meanwhile, those who worked with Visual Basic will find in GDI+ an accessible way into developing bespoke controls that augment those shipped with the framework.
The part of the .NET Framework base-class library that falls under the GDI+ banner is substantial, and in a book of this size we can't hope to cover every angle. Therefore, the approach we take in this book is to concentrate on the areas and features of GDI+ that are relevant to programmers who are most likely to work with these classes - that is, programmers looking to develop custom controls. We will be covering the creation of Windows Forms custom controls in this book in great depth, but we will also touch on creating custom ASP.NET server controls during the final three chapters.
Who is this Book For?
This book is designed to appeal to any developer who wishes to appreciate and exploit the functionality of the GDI+ base classes provided as part of the .NET Framework. In particular, the book is aimed at those working in a business-application environment, presenting techniques and information suitable to those aiming to accomplish the task of writing GDI+ code for Windows Forms and Web Forms in order to create custom controls.
The examples in this book (both the GDI+ demonstration examples in the early part of the book, and the application of GDI+ within custom controls later on) are presented in the C'~' language. They should be accessible both to intermediate-level C# programmers and to any relatively experienced developer capable of recognizing the standard constructs and features of an object-oriented language.
However, the choice of C# for the examples in this book is less important than the fact that it is a book about developing with GDI+ and custom controls in .NET. Indeed, the GDI+ techniques covered here are language-neutral - they can be applied, with the appropriate language knowledge, using other .NET
Framework languages such as Visual Basic .NET and Visual C++ .NET.
What Does this Book Cover?
Structurally, this book falls naturally into four sections. The first section consists of a single chapter, Chapter 1, which provides a brief overview of GDI+, its purpose and structure, and gives some context for the development and use of custom controls in .NET applications. At the end of that chapter, a short example illustrates the salient features of the Visual Studio .NET environment that we will consistently use throughout the book.
The second section of the book consists of Chapters 2-10, and may loosely be considered to tackle the nuts and bolts of GDI+ programming. We'll look at all of the classes, methods, properties, and events that are most important to the application of GDI+ in custom controls, and we'll include plenty of description and demonstration:
In Chapter 2 we'll look at GDI+ fundamentals such as drawing surfaces and coordinate systems. It includes an introduction to the Graphics object, which encapsulates a drawing surface. We'll see that there are basically three types of drawing surface (screens, bitmaps, and printers). Our Graphics object provides us with methods for drawing and painting onto our drawing surface, as well as for managing many other features - for example, measuring units, transformations, clipping, and invalidation. Hence, the Graphics class provides the foundation for much of the rest of the book.
In Chapter 3 we'll cover pens and brushes. GDI+ makes a distinction between drawing and filling, and this fact is encapsulated well in the existence and juxtaposition of the Pen and Brush classes. These two classes are fundamental graphics tools, and we'll try to capture their versatility in this chapter.
In Chapter 4 we turn our attention to texts and fonts - we see how GDI+ gives us the opportunity to take programmatic control of the content and nature of the text in our graphics. We take a careful look at the Font and FontFamily classes, and understand how they relate to the rest of our graphics.
Chapter 5 moves on to discuss images and image manipulation, and even how to create and save images.
Chapters 6 and 7 move on to the important subject of paths and regions - encapsulated in GDI+ by the GraphicsPath and Region classes. First, we see how these classes further highlight the distinction between drawing outlines and filling areas; they enable us to work with more irregular shapes than previously considered, and to group sets of shapes together for more effective processing. Then, we build on this knowledge by explaining how these objects can be used in operations such as clipping and invalidation, to create some useful and powerful effects.
Chapter 8 explains how to handle transformations in GDI+. While translations, rotations, and shearing aren't commonly used in custom control development, this chapter will highlight some interesting techniques.
Having focused on screen-based rendering in these early chapters, Chapter 9 discusses the subject of printing. We develop an appreciation of how to control differences between what we see on the screen and what the printer outputs to the page.
Chapter 10 describes how to set up an alternative coordinate system, which you may find helpful in your development of custom controls. It involves subtle changes in the semantics of the Graphics class. We can't inherit from the Graphics class itself (because it is defined as sealed), but we can "modify" its behavior by employing a design pattern called the decorator pattern - in which we define our own class whose methods have identical signatures to the methods in the Graphics class.
From here onwards, the chapters begin to focus more specifically on custom control architecture and development. The third section of the book introduces the concept of a custom control and covers the issues we need to consider when deciding what features to build into our application, as well as taking into account the requirements of the user interface:
First things first, we have a review of custom controls in Chapter 11, including a definition, characteristics exhibited by them, and comparisons with components. We will consider some of the custom control theory at a high level before moving on to examples of custom controls, demonstrating their behavior, such as properties, focus, events, derivation from custom controls, and composite custom controls.
In Chapter 12, we consider some of the ways in which we can build in functionality for our custom control to make it easier for other developers to use our controls in their code. More specifically, we will focus on better integrating our controls with Visual Studio .NET, such as creating modal boxes and drop-down boxes to edit properties. All these features are to make life easier, at design time, for the developer using our control.
When building a custom control, we'll often require a virtual space that is greater than the physical space. We encounter this problem in Chapter 13 and look at the options available to us when we want to implement scrolling in our custom controls. We look at the built-in support for scrolling in the Windows Forms classes, but we will see why it is preferable to implement scrolling through a custom control. We will also look at how we can implement smooth scrolling, for a more polished feel to our application.
In Chapter 14, we will look at another user interaction feature: the mouse. We'll see how to develop our control so that it performs different functions when the mouse is used in different ways, including hit testing, mouse event routing, dragging, and drag-scrolling. By their nature, graphical user interfaces are visual, so we'll also take a look at cursors in our applications, and what we can do with them.
In the final section of the book, we move the focus of using GDI+ functionality from Windows Forms to Web-based situations. The last three chapters of the book will consider situations in which the developer needs to use the power of ASP.NET to serve GDI+ images, create custom controls across the Web, and utilize web services technology. We do not cover these situations in great depth, but we do provide a framework for using GDI+ in these different situations:
In Chapter 15, we will look at serving GDI+ images across the Internet. First, we will grab an image from a web server's file system and serve it to the client application view, an ASP.NET page, using GDI+ code. We will look at other web image manipulation techniques, such as mixing HTML and dynamic images, modifying images with GDI+, and finally, the creation of pie charts.
In Chapter 16, we will extend our understanding of custom controls by creating some custom ASP.NET server controls. These are similar in nature to Windows Forms custom controls, but are implemented very differently. We will see examples of ASP.NET user controls in this chapter, including a button user control, and an example that creates and manipulates thumbnails, and we'll discuss support for design-time features.
In the final chapter of the book, Chapter 17, we shall look at how GDI+ can be used in web services for returning images and image data. We begin with a brief discussion of the thinking behind web services, and then we will see three increasingly complex examples of web services that use GDI+. We will examine the simple Hollo World service, then move on to a web service that returns an image from a URL, and finally, a web service that returns data from an image to draw a pie chart.
What You Need to Use this Book
To run the samples in this book, you will need:
A suitable operating system. At the time of writing, Microsoft recommends Windows 2000 (Professional, Server or Advanced Server edition) with Service Pack 2, or Windows XP Professional edition.
The .NET Framework SDK.
The examples in this book are developed using the Visual Studio .NET IDE. It is possible to build the examples without the VS.NET IDE, but we don't cover that in the book. We recommend that you also download the complete source code for the examples in this book, from http://www.wrox.com (see the Customer Support and Feedback section below). Whether you plan to cut- and-paste the code from these source files, or type the code for yourself, the source code provides a valuable way to check for errors in your code.
Style Conventions
We have used certain layout and font styles in this book that are designed to help you to differentiate between the different kinds of information. Here are examples of the styles that are used, with an explanation of what they mean.
As you'd expect, we present code in two different ways: in-line code and displayed code. When we need to mention keywords and other coding specifics within the text (for example, in discussion relating to an if... else construct or the GDI+ Graphics class) we use the single-width font shown in this sentence. Ifwe want to show a more substantial block of code, then we display it like this:
private Void Fermi_Paint (object sender,
Syst em.Windows. Forms. PaintEventArgs e)
{
Graphics g = e.Graphics;
g,FillRectangle(Brushes.White, this.ClientRectangle);
}
Sometimes, you will see code in a mixture of gray and white backgrounds, like this:
private void Forml_Paint(object sender,
System. Windows. Forms. PaintEventArgs e)
{
Graphics g = e.Graphics;
g. FillRectangle(Brushes.White, this.ClientRectangle);
g. DrawRectangle(Pens.Black, 10, 10, 50, 40);
)
In cases like this, we use the gray shading to draw attention to a particular section of the code – perhaps because it is new code, or because it is particularly important to this part of the discussion. We also use this style to show output that is displayed in the console window.
Advice, hints, and background information comes in an indented, italicized font like this.
Important pieces of information (that you really shouldn't ignore) come in boxes like
this!
Bulleted lists appear indented, with each new bullet marked as follows:
Important Words are in a bold type font.
Words that appear on the screen, or in menus like File or Window, are in a similar font to the one you would see on a Windows desktop.
Keys that you press on the keyboard like Ctrl and Enter are in italics.
Customer Support and Feedback
We value feedback from our readers, and we want to know what you think about this book: what you liked, what you didn't like, and what you think we can do better next time. You can send us your comments, either by returning the reply card in the back of the book, or by e-mail to feedback@wrox.com. Please be sure to mention the book's ISBN and title in your message.
Source Code and Updates
As you work through the examples in this book, you may choose either to type in all the code by hand, or to use the source code that accompanies the book. Many readers prefer the former, because it's a good way to get familiar with the coding techniques that are being used.
Whether you want to type the code in or not, it's useful to have a copy of the source code handy. If you like to type in the code, you can use our source code to check the results you should be getting - it should be your first stop if you think you might have typed in an error. By contrast, if you don't like typing, then you'll definitely need to download the source code from our web site! Either way, the source code will help you with updates and debugging.
Therefore all the source code used in this book is available for download at http://www.wrox.com. Once you've logged on to the web site, simply locate the title (either through our Search facility or by using one of the title lists). Then click on the Download Goclo link on the book's detail page and you can obtain all the source code.
The files that are available for download from our site have been archived using WinZip. When you have saved the archive to a folder on your hard drive, you need to extract the files using a de-compression program such as WinZip or PKUnzip. When you extract the files, the code will be extracted into chapter folders. When you start the extraction process, ensure that your decompression program is set to use folder names.
Errata
We have made every effort to make sure that there are no errors in the text or in the code. However, no one is perfect and mistakes do occur. If you find an error in this book, like a spelling mistake or a faulty piece of code, we would be very grateful to hear about it. By sending in errata, you may save another reader hours of frustration, and of course, you will be helping us provide even higher quality information. Simply e-mail the information to support@wrox.com; we'll check the information, and (if appropriate) we'll post a message to the errata pages, and use it in subsequent editions of the book.
To find errata on the web site, log on to http://www.wrox.com/, and simply locate the title through our Search facility or title list. Then, on the book details page, click on the Book Errata link. On this page you will be able to view all the errata that have been submitted and checked through by editorial. You will also be able to click the Submit Errata link to notify us of any errata that you may have found.
Technical Support
If you would like to make a direct query about a problem in the book, you need to e-mail support@wrox.com. A typical e-mail should include the following things:
In the Subject field, tell us the book name, the last four digits of the ISBN (6314 for this book),and the page number of the problem.
In the body of the message, tell us your name, contact information, and the problem.We won'tsend you junk mail. We need these details to save your time and ours. When you send ane-mail message, it will go through the following chain of support:
1. Customer Support - Your message is delivered to one of our customer support staff -
they're the first people to read it. They have files on most frequently asked questions and
will answer anything general about the book or the web site immediately.
2. Editorial - Deeper queries are forwarded to the technical editor responsible for the book.
They have experience with the programming language or particular product, and are able
to answer detailed technical questions on the subject. Once an issue has been resolved,
the editor can post the errata to the web site.
3. The Authors - Finally, in the unlikely event that the editor cannot answer your problem,
they will forward the request to the author. We do try to protect the author from any
distractions to their writing; however, we are quite happy to forward specific requests to
them. All Wrox authors help with the support on their books. They will mail the customer
and the editor with their response, and again all readers should benefit.
Note that the Wrox support process can only offer support to issues that are directly pertinent to the content of our published title. Support for questions that fall outside the scope of normal book support is provided via the community lists of our http://p2p.wrox.com/forum.
p2p.wrox.com
For author and peer discussion join, the P2P mailing lists. Our unique system provides programmer to programmerTM contact on mailing lists, forums, and newsgroups, all in addition to our one-to-one e-mail support system. Be confident that your query is being examined by the many Wrox authors, and other industry experts, who are present on our mailing lists. At p2p.wrox.com you will find a number of different lists that will help you, not only while you read this book, but also as you develop your own applications.
To subscribe to a mailing list just follow this these steps:
1. Go to http://p2p.wrox.com/and choose the appropriate category from the left menu bar.
2. Click on the mailing list you wish to join.
3. Follow the instructions to subscribe and fill in your e-mail address and password.
4. Reply to the confirmation e-mail you receive.
5. Use the subscription manager to join more lists and set your mail preferences.