Who Should Read This Book?


When writing this book, we had two target audiences in mind. We wanted to provide real-world WinForms coverage for both the programmer who has already programmed in .NET and for the programmer who hasn't. Toward that end, we briefly introduce core .NET topics as they come up. However, the .NET Framework itself is a large area that this book doesn't pretend to cover completely. Instead, when we think more information would be useful, we reference another work that provides the full details. In particular, we find that we've referenced Essential .NET , by Don Box, with Chris Sells, a great deal, making it a good companion to this book. In this same category, we also recommend Pragmatic ADO.NET , by Shawn Wildermuth, Advanced .NET Remoting , by Ingo Rammer, .NET Web Services , by Keith Ballinger, and Applied Microsoft .NET Framework Programming , by Jeffrey Richter. (For more details on these books, see the Bibliography.)

Two core .NET topics are of special importance to WinForms programmers, and we cover them in more detail in Appendix B: Delegates and Events and in Appendix C: Serialization Basics. The coverage of delegates and events is particularly important if you're new to .NET, although I don't recommend diving into that topic until you've got a WinForms-specific frame of reference (which is provided about one-third of the way through Chapter 1: Hello, Windows Forms).

One other note: This book covers none of the standard controls completely. Instead, as each control is interesting in the context of the current topic ”such as the DataGrid control in Chapter 13: Data Binding and Data Grids ”that control is covered appropriately. Also, Chapter 8: Controls and Chapter 9: Design-Time Integration introduce the broad range of categories of controls that WinForms provides, including the category of nonvisual controls called components in .NET.

Finally, to give you a visual to go with all the controls and components and to introduce you to each one's major functionality, Appendix D: Standard WinForms Components and Controls provides a list of the standard controls and components. We wouldn't think of wasting your time by attempting to be more thorough than the reference documentation that comes with the .NET Framework SDK and Visual Studio .NET. Instead, this book focuses on the real-world scenarios that aren't covered in detail elsewhere.

Conventions

If you have decided to take the plunge with this book, we'd like to thank you for your faith and express our hope that we live up to it. To aid you in reading the text, we want to let you in on some conventions we've used.

First and foremost, the wonderful thing about WinForms is how visual it is, and that's why we use a lot of figures to illustrate its features. Some of those pictures really need to be in color to make the point, so be sure to check the color pages at the center of this book for those color plates.

As useful as figures are, we think primarily in code. Code is shown in monospace type:

 
 System.Console.WriteLine("Hello, WinForms.") 

Console application activation is also shown in monospace type:

 
 C:\> vbc.exe hello.vb 

When a part of a code snippet or a command line activation is of particular interest, we mark it in bold and often provide a comment:

 
  ' Notice the use of the .NET System namespace   System.Console.WriteLine("Hello, WinForms.")  

When we want to direct your attention to a piece of code even more fully, we replace superfluous code with ellipses:

 
 Class MyForm   Inherits System.Windows.Forms.Form   ... '  fields  Private Sub MyForm_Load(sender As Object, e As EventArgs)     MessageBox.Show("Hello from MyForm")   End Sub End Class 

Furthermore, to make the printed code more readable, we often drop namespaces and protection keywords when they don't provide additional information:

 
 ' Shortened "System.Windows.Forms.Form" base class Class MyForm   Inherits Form   ... ' fields   ' Removed "Private" specifier and "System.ComponentModel" namespace   Sub MyForm_Load(sender As Object, e As EventArgs)     MessageBox.Show("Hello from MyForm")   End Sub End Class 

Conversely, when showing .NET attributes, we use their full name :

 
 <SerializableAttribute()> _ Class MyCustomType  ... End Class 

Some languages, such as C#, let you drop the "Attribute" suffix for convenience, but that makes it hard to pin down the details of the attribute class in the online documentation.

Also, we sometimes omit error checking from the printed code for clarity, but we try to leave it in the sample code that comes with this book.

In the prose itself, we often put a word or phrase in italics to indicate a new term that we're about to define. As an example of this kind of term and its definition, hegemony is a preponderant influence or authority, as well as a potent business practice.

Finally, we often mention keyboard shortcuts because we find them convenient . The ones we mention are the default Visual Studio Developer key bindings. If you're not using those key bindings, you'll need to map the keyboard shortcuts to your own settings.



Windows Forms Programming in Visual Basic .NET
Windows Forms Programming in Visual Basic .NET
ISBN: 0321125193
EAN: 2147483647
Year: 2003
Pages: 139

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net