Errata

Programming .NET Windows Applications

Errata for Programming .NET Windows Applications

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 108
pad = 11 - (sum % 11) ditto page 110 for VB version

'One-Off Error'

Your code allows values for Pad in the range 1 to 11, whereas the check digit is in
the range 0 - 10.

The solution is to set the Pad == 11 value to zero (which is correct in the written
check algorithm)

so, following the above line add:

Pad = Pad == 11 ? 0 : Pad;

Anonymous   
Printed Page 195
Example 6-12

Example 6-12 specifies this to specify the initial directory: ofd.InitialDirectory = "c:\\"

When I use that code in Visual Studio 2005 (standard edition) on a machine running Windows 7, the file dialog sends me to my Documents Library. If I remove the second forward slash (ofd.InitialDirectory = "c:\"), then the file dialog takes me to C:\ as desired.

Perhaps Visual Studio changed how slashes are handled in quotes.

Anonymous  Feb 16, 2012 
Printed Page 212
upper third, btnPrint_Click block

Using the VB code for Example 6-22 in Visual Studio 2005 with Windows 7, the print dialog will not appear, instead it just returns automatically with a Cancel result. Via the MSDN forums, I discovered that the UseExDialog variable for pdlg must be set to True (i.e., "pdlg.UseEXDialog = True") before the pdlg.ShowDialog command is used.

See, for example: http://social.msdn.microsoft.com/Forums/en-US/vblanguage/thread/8fdc4a38-618d-450d-9e4b-0832320d795e

Anonymous  Feb 16, 2012 
Printed Page 355
Figure 10-3

Figure 10-3 does not show the result of the programs in Example 10-1 or 10-2 as promised (p. 354: "When either program in Example 10-1 or Example 10-2 is compiled and run, you will get the form shown in Figure 10-3."

Figure 10-3 shows properties for a button, whereas the program creates a form that contains a single text message ("Look Ma, no label!"). It looks like Figure 10-3 is a duplicate of Figure 7-4 on page 243.

Anonymous  Apr 26, 2012 
Printed Page 357
Example 10-3 and the last paragraph

I. Example 10-3 has the base.OnPaint(e) call as the last line in the derived
OnPaint() method. The call should be on the first line, else you run the risk of the
base routine interfering with what the derived routine does.
Note: Examples 10-4 and 10-5 do call the base routine on the first line.

II. The last paragraph, in describing both Examples 10-3 and 10-4, says:
The last line in the overridden method chains up to the base method...
it should say:
The first line in the overridden method chains up to the base method...

Anonymous