Wrox Home  
Search

Topic: Visual Basic

Beginning VB.NET, 2nd Edition (0764543849) cover image

Beginning VB.NET, 2nd Edition

Richard Blair, Jonathan Crossland, Matthew Reynolds, Thearon Willis
ISBN: 978-0-7645-4384-5
Paperback
888 pages
August 2002
This title is out-of-print and not currently available for purchase from this site.


Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
17 Missing Chapter 17 Code
You can find the code for DataGrid Sorting in the code download section of the 3rd edition, ISBN 0764556584.
7/7/05
2 IIS 5 and ASP.NET
On page 2 it states that chapters 17 and 19 rely on asp.net technology so you will need IIS 5.0.
As mentioned in the book itself, IIS 5.0 and above is required to deploy the ASP.NET based solutions. The default configuration of IIS 5.0 only supports ASP 3.0, but when you install Visual Studio.NET on your machine, the .NET framework updates the IIS 5.0 so that it can be used to deploy ASP.NET based solutions.
You can easily go ahead with IIS 5.0 for your ASP.NET based solution; the only thing you need to install on your web server is the latest version of Microsoft .NET Framework.
08/1/03
34 Error in code
The code as written gives a swigley blue line error under the last underscore and "HelloUser Message". To correct this, omit the last underscore and the "HelloUser Message". It should look like the diagram on page 36.
1/25/05
78 2 Byte Strings

Where we define each character in a string as being a byte (8 bits) long, it should be 2 bytes (16 bits long).

18-Sep-02 1
80 "27" as a String

Assigning "27" to a string takes up 4 bytes of memory because in .NET each character is 2 bytes long.

18-Sep-02 1
155 Storing State

Under the Storing State section, in the second paragraph, last sentence, swap "to" and "do" around so the text says
"We'll see how to do this in a moment."

04-Nov-02 2
303 Possible Bug with AcceptButton Property

According to the Microsoft documentation, "On any Windows Form you can designate a Button control to be the accept button, also known as the default button. Whenever the user presses the ENTER key, the default button is clicked regardless of which other control on the form has the focus. (The exceptions to this are when the control with focus is another button ??? in that case, the button with the focus will be clicked ??? or a multiline text box, or a custom control that traps the ENTER key.)" However, this does not appear to be the case. Setting the AcceptButton property in step 7 of the Try It Out does not seem to override the focus as it should. If the tab order is set such that the LinkLabel control has the focus when the About form is loaded, pressing ENTER opens the link rather than mimicking a click on the OK button.

20-Sep-02 1
454 fileName

Replace "strFile" with "fileName" in the ProcessFile procedure:

myReader = File.OpenText(fileName)
18-Sep-02 1
474 Code Inconsistent

How It Works code is inconsistent with the Try It Out, so replace:
strLine with currentLine
objReader.ReadLine with myReader.ReadLine
intLineCount with lineCounter
strData with currentData

27-Sep-02 1
481 Whitespace

In the foreground box, the text should read "whitespace" instead of "writespace".

18-Sep-02 1
500 Answers to Questions

The answers to the chapter 12 questions on page 500 appear under the Chapter 13 heading on page 833.

18-Sep-02 1
508 MyControl.vb

Step 1, UserControl1.vb should read MyControl.vb

27-Sep-02 1
509 MyControl

Step 5, My First Control should read MyControl

27-Sep-02 1
510 MyControl.vb

Try It Out heading and step 1, UserControl1.vb should read MyControl.vb

27-Sep-02 1
511 MyControl

Step 4, MyControl1 should read MyControl

27-Sep-02 1
512 MyControl

Raising Events step 1, UserControl1.vb should read MyControl.vb
Consuming Events step 1, Control Test should read MyControl

27-Sep-02 1
513 MyControl.Reset

Step 2, MyControl1.Reset should read MyControl.Reset

27-Sep-02 1
515 Public Class FileButton

Remove <AttributeUsageAttribute(AttributeTargets.All)> from the first line of code in bullet 1 of the Try It Out so it becomes:

Public Class FileButton
04-Nov-02 2
516 Change in text

Ignore the first paragraph of the How It Works ??? this explanation refers to code that is no longer shown. Remove the first line of the second paragraph, and start the paragraph:
"Our original control was derived from???"

04-Nov-02 2
534 Answers to Questions

The answers to the chapter 13 questions on page 534 appear under the Chapter 14 heading on page 834.

18-Sep-02 1
586 Checking Image Height

The second IF statement replaces an ELSE. With the IF instead of the ELSE, the height will now be checked, even if the image width is greater than the available space and has to be resized.

If imageWidth > clientRectangle.Width Then
      imageWidth = clientRectangle.Width
      imageHeight = CType(CType(imageWidth,
                          Double) * ratio, Integer)
   End If
   If imageHeight > clientRectangle.Height Then
      imageHeight = clientRectangle.Height
      imageWidth = CType(CType(imageHeight,
                         Double) / ratio, Integer)
   End If
18-Sep-02 1
589 Answers to the Questions

The answers to the chapter 14 questions on page 589 appear under the Chapter 12 heading on page 832.

18-Sep-02 1
672 objCommand.Parameters.Add("@price", txtPrice.Text)

In part 1 of the Try It Out, change the line of code shown above so that it reads:

objCommand.Parameters.Add("@price", txtPrice.Text).DbType = DbType.Currency
21-Nov-02 3
17 681 Bug Affecting ASP.NET Code

Some readers may find that having Simple File Sharing enabled when running on Windows XP Professional can cause security problems that affect how ASP.NET code operates (in particular, issues with IIS and server controls).

Such readers should ensure that they have installed the latest service packs and that Simple File Sharing is disabled.

See MSDN Knowledge Base Article Q315158, "BUG: ASP.NET Does Not Work with the Default ASPNET Account on a Domain Controller", for more details.

06-Dec-02 1
823 Exit Do

Under the answer for chapter 3, question 4, to exit a Do???Loop we use the command Exit Do and not Exit Loop.

11-Nov-02 1
Printer-Ready Version   Share This
With you wherever you go: pdf + ePub + kindle -- DRM-free

Bonus Material